GeminiDomino posted on Feb 19 2006 at 02:25 AM said:
Ok, I've got it. The problem seems to be that if I use -static, it wants to compile ALL of the libraries statically (which fails since libUnicodeFont doesn't build a static library). So the trick is to get LFLAGS to link SDL and Unicode dynamically (since I don't want the SDL compiled in for obvious reasons) and png, png12, and jpeg statically.
Aha, now I see. You're in the nasty minefield of "I want some static and some dynamic". I think a lot of us have been avoiding this by linking EVERYTHING staticly, including SDL. For a system like the GP2X, it's really the most reasonable course. You don't want to depend on some particular version of SDL dynamic libraries to have been copied to the NAND.
You remember when I said that the "static vs. dynamic" decision was made at link time? Well, creating a dynamic library is in effect a linking process, so the dynamic SDL_image.so has already decided that libjpeg should be dynamic. That's why you can't control that decision during your app's link step.
Your simplest solution, then, may be to include the dynamic libjpeg.so as part of your app's directory when you copy it to the SD, and include an LD_LIBRARY_PATH statement in the .gpe that starts the app up.