From: Joe K. <kr...@ni...> - 2006-09-24 21:18:02
|
The way library pragmas work in MS-Windows is that the compiler generates a special object-file directive in a special ".drective" section. I think that you can build a static library that automatically pulls in dependent libraries by simply including object files containing these directives. The problem is that Win32 gcc appears not support either the #pragma or the .drective for library dependencies. SInce this is the way MS-Win32 deals with dependencies, it would be nice if gcc would support it. I suspect they don't just because the design is 'ugly'. The alternatives are to explicitly include link flags, or use a non-MS library format, for example a 'libtool' library. This is probably one reason why many cross-platform libs include a script to emit linker flags, like "freetype-config --libs". Joe |