10.03.2019 - Round 1 results of our "A Love Letter For FreeBASIC" game dev competition have been published. Please be sure to check the results thread: http://games.freebasic.net/forum/index.php?topic=629.0. Don't forget that the competition is continuing with a round 2, lasting till 29th of April, 300 USD first prize. Stay tuned!

Author Topic: The Dark Art of External Libraries  (Read 3773 times)


  • Amoeba
  • *
  • Posts: 15
    • View Profile
The Dark Art of External Libraries
« on: December 27, 2007, 03:38:57 AM »
This may be a little general, but I think it would be especially useful to game developers.

Several times now, I've posted in the freebasic forum asking how to use this or that library. I think instead of cluttering the boards with continual requests like this, it would be a good idea to have a tutorial that teaches basically how to impliment any external library in FB. For designing games, I'm sure there are tons of libraries that would be great to use, but only a select few have been ported to FB.

Here's what we need:
1 - how to use external libraries in FB (assuming the library is precompiled, and headers are available)
2 - how to convert headers from other languages into .bi headers (using SWIG or doing it manually)
3 - how to compile external library source code (using GCC, of course) and make it FB compatible
... anything else that I missed

I think with this information available, we would have a lot fewer requests for code conversions, and a lot more people actually contributing to the project. I know that sounds like a fb.net motive, but who needs to be able to use a broad set of external libraries more than solo game developers?
-- Don't quote me on that


  • Global Moderator
  • Forum Sage
  • *****
  • Posts: 351
  • Who's the guy from 21 Jump Street?
    • AOL Instant Messenger - notthecheatr
    • Yahoo Instant Messenger - TheMysteriousStrangerFromMars
    • View Profile
    • notthecheatr Home
    • Email
Re: The Dark Art of External Libraries
« Reply #1 on: December 27, 2007, 11:05:19 AM »
That would probably be great, but it would also be a very long thing to write. And even then the absolute n00bs wouldn't cease their questions.  Perhaps more useful would be to write specific tutorials for each library.  If you use a library and nobody else has written a tutorial for it, write one!

Generally though, if you want to be a good programmer, you have to be willing to do some experimenting, exploring, etc.  I learned to use wx-c by paintstakingly looking through the headers and figuring out how functions worked based on their name and arguments (of course, the examples helped).  If people understand that that's what it takes to learn something new, then they'll do it (as opposed to asking someone else to do it for you, because if you don't understand what they did then you aren't really learning anyways).

It would also be good to have a newbie tutorial for understanding C.  Not writing C code, just understanding C from a FreeBasic perspective.  That would make converting headers and things much easier.
The funniest thing happened yesterday.