[Qt-interest] "ld: library not found for -lQtGui" when building from within Eclipse but command line make works

Kustaa Nyholm Kustaa.Nyholm at planmeca.com
Thu Apr 15 08:45:43 CEST 2010


Hi,

I'm writing a Qt plugin in Qt 4.7 configured with -developer-build switch.

Buiding my plugin (and for that matter anything) from command line with
simply 'make' works. However using make from within Eclipse fails with:


c++ -fno-exceptions -bundle -o libjvfbgraphicssystem.dylib
obj/release-shared-emb-generic/JVFB_IntegrationPlugin.o
obj/release-shared-emb-generic/JVFB_Integration.o
obj/release-shared-emb-generic/JVFB_WindowSurface.o
-L/Users/nyholku/lighthouse/lighthouse/lib -lQtGui
-L/Users/nyholku/lighthouse/lighthouse/lib -lQtNetwork -lQtCore
ld: library not found for -lQtGui
collect2: ld returned 1 exit status
make[1]: *** [../../../../plugins/platforms/libjvfbgraphicssystem.dylib]
Error 1

So  obviously it does not find the library.

I've checked that current working directory in Eclipse is set
to the directory where I execute the make when using command line,
do I have to set some environment variables? And why do I not
have to set them from the command line?

br Kusti





More information about the Qt-interest-old mailing list