User forums > Help

linking error? where to check?

(1/1)

pawelk:
On fedora 10, c::b v 8.02,
I'm using the FLTK library and get an error that seems strongly to refer to x lib, or rather, not having x lib linked.  Where in c::b do I check the linker line/settings?

btw the Project menu | Build Options item | Linker Settings tab | Link Libraries box is empty, (and `fltk-config --ldstaticflags`is in the Other linker options box).

Jenna:
Change "Settings -> Compiler and debugger... -> Global compiler settings -> [the compiler you use] -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline" and you get the commandline cretaed by C::B in the build log.

pawelk:
Thanks.

pawelk:
I've read somewhere that the order of libraries being linked can be relevant. 
If I've added libX11.so via Project > Build Options > Linker Settings > Link Libraries so that the Build Log then shows:


--- Code: ---g++  -o bin/Release/one obj/Release/main.o   /usr/lib/libfltk.a   /usr/lib/libX11.so
--- End code ---

How could i put the libX11 lib before the fltk lib?

Jenna:

--- Quote from: pawelk on March 27, 2009, 02:33:07 pm ---I've read somewhere that the order of libraries being linked can be relevant. 
If I've added libX11.so via Project > Build Options > Linker Settings > Link Libraries so that the Build Log then shows:


--- Code: ---g++  -o bin/Release/one obj/Release/main.o   /usr/lib/libfltk.a   /usr/lib/libX11.so
--- End code ---

How could i put the libX11 lib before the fltk lib?

--- End quote ---

Did you remove the

--- Code: ---`fltk-config --ldstaticflags`
--- End code ---

On the commandline you should should get something like this:

--- Code: ---jens@debian-inspiron:~$ fltk-config --ldstaticflags
/usr/lib/libfltk.a -lXft -lfontconfig -lXinerama -lm -lX11
--- End code ---

The wizard-projects works fine for me (with installed dev-package of course).

We come away from the scope of this forum, so I lock this topic now, sorry.

Navigation

[0] Message Index

Go to full version