Sign in to follow this  
trajectorymodifier

creating a library ... how to?

Recommended Posts

the reason for starting this noobly thread is because I've reached a certain degree of completion with my framework (well, 99.9% of what I want to use it for just now) and I'd like to recompile it or transform it into a library from the bunch of headers & source files it is at the moment. The framework is OpenGL / SDL (+ _Image, _Mixer) based, and I'd like to build the libraries for at least OSX, Win32(, Linux / GP2X, maybe). There's no multi-threaded functionality (EDIT: ... added -- there might be whatever multithreadedness (like in SDL_Mixer)). very little have I ever found on the topic, and would much appreciate some nudges in the right direction (links, recommended books, etc.): - what refactoring do I need to do, what will be the entry point of the library? (the only core functionality the framework has is to initialize SDL on startup (OpenGL is initialized by the graphics subsystem)) - how do I make sure that it dynamically links to the libraries / frameworks it depends on - whereas it'll be a .dll under Windows, what format should I go for under OS X? (.dylib, .framework, something else?) what are the differences? I understand that this is a huge topic to cover, and not expecting ready made solutions, but each and every bit of help would be great. (I'm just going through this: http://www.gamedev.net/reference/articles/article1583.asp ; hopefully it'll help too) [Edited by - trajectorymodifier on October 13, 2008 10:53:39 AM]

Share this post


Link to post
Share on other sites
I have been doing a similar sort of thing, I created a framework in SDL and I wanted to put it into a library. I decided to go with making it a static library for ease of use, the main problem that I had was that it couldn't find the SDL functions that it was trying to use, I think this was something to do with it not being aware of the DLLs and I haven't yet found a solution to the problem.

The "entry point" as you put it would be simply to #include the header files that go with the parts of the library that you want to use and then to link the library to your project when you compile it.

I'm not sure if that is of any help to you but seeing as I am trying to do the same thing I thought I would try my best.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this