PDA

View Full Version : Compiling DevIL as a static library


Jones
2006.08.07, 02:38 PM
EDIT: Ignore the post, delete it if you want/can, I've found an answer. Thanks!

I am currently trying to make a DevIL static library, to avoid the complications which seem to arise from dynamic libs.

Unfortunatly, I'm not really sure how to go about doing this. I do know how to compile a static library thanks to some refs I found online. I did make a simple one once, IE: One source file. DevIL however has loads and loads of files and depends on *loads and loads* of other libraries.

What I'm hoping to do is just chuck them *all* into *one* <.a> lib with some header files to go along with it.

I've got the source for the libs that DevIL needs (it came with FreeImage, which does not compile *completely ok*).

I have source of:
- LibJPEG
- LibTIFF
- LibPNG
- LibMNG
- Zlib

Devil also needs Little CMS which I am going to try and procure.

I have the following in .a format, could they be built into another static lib?
- LibJPEG
- LibTIFF
- LibPNG
- LibMNG
- LibLCMS (little CMS)

zLib comes with Mac OS X compiled, I think, but I'll just try to compile it myself.

My plan:

Copy the source files for every single one of the API's devil needs, along with the devil source into a folder and then run a generic gcc/g++ command line call with use of wildcards. I'll do the same but with the ar tool to make *one* .a lib.

I'm guessing it'll never work, which is why I'm here. :cool:

How would you go about doing this? :)

Thanks!