Re: Compiling glib applications



On 09.08.2012 14:46, Lanoxx wrote:
gcc main.c `pkg-config --cflags glib-2.0` `pkg-config --libs glib-2.0`
-o main --std=c99

This is probably necessary due to "--as-needed" appearing in the default linker flags. If this is specified, the linker will, for each library, only include symbols that are used in object files that appear before the library.

<http://sourceware.org/binutils/docs-2.21/ld/Options.html#Options>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]