|
From: Keith M. <kei...@us...> - 2009-03-14 10:15:17
|
On Saturday 14 March 2009 09:18:25 Nathan Schulte wrote: > The issue is that whenever I try to compile and link the simplest > code (like the gtkmm hello world example) as follows: > > g++ `pkg-config --libs --cflags gtkmm-2.4` main.cpp > > all I get are a bunch of linker errors, [...] > > Does anyone know why this may be happening? Looks like an argument ordering issue: no external references in main.cpp can *ever* be resolved, because there are no libraries specified *after* it, to provide resolution. Conversely, any libraries specified by your pkg-config command will be simply and silently discarded, because there are no dependencies known for them, *before* they are parsed; (those will be defined in main.cpp, which is parsed too late). -- Regards, Keith. |