PDA

View Full Version : Compilation/Linker issues on Ubuntu 8.10



floyd
18th November 2009, 06:11
Hello

I have installed QT 4.5.3 on Ubuntu Linux 8.10. I am having problems compiling the gui library. I have been able to compile other libraries.
I have installed all the dependencies mentioned at
http://qt.nokia.com/doc/4.5/requirements-x11.html

Though, after configuring I was getting many compilation errors wrt to header files not found. I have given the include path appropriately for the include files. It got rid of the compilation errors, though now I have problem with the linker.
I am pretty clueless now as to the problem is. The libglib-2.0.a and libgtk-x11-2.0.a files are available in the lib path.
I am not sure if I am missing on some environment variables or some thing. Please help.

I am configuring by giving the following command

./configure -v -no-gtkstyle -no-phonon -no-webkit -no-fontconfig -openssl -I/usr/local/ssl/include -I/usr/include/gtk-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -L/usr/local/ssl/lib


and the generated Makefile contains

LFLAGS = -Wl,--no-undefined -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.3/lib -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.3/lib -shared -Wl,-soname,libQtGui.so.4

LIBS = $(SUBLIBS) -L/usr/local/ssl/lib -L/home/test/qtsdk-2009.04/qt/lib -L/usr/X11R6/lib -L/usr/lib -pthread -lpng -lfontconfig -lfreetype -lSM -lICE -lQtCore -lgtk-x11-2.0 -lglib-2.0 -L/usr/local/ssl/lib -L/home/test/qtsdk-2009.04/qt/lib -lz -pthread -lgthread-2.0 -lrt -lpthread -lXrender -lXext -lX11 -lm -ldl

-----------------------------
Below is the error log
.obj/release-shared/qgtkstyle.o: In function `.L467':
/home/test/qtsdk-2009.04/qt/src/gui/styles/qgtkstyle.cpp:484: undefined reference to `g_object_get'
.obj/release-shared/qgtkstyle.o: In function `.L1921':
/home/test/qtsdk-2009.04/qt/src/gui/styles/qgtkstyle.cpp:948: undefined reference to `g_type_check_instance_cast'
/home/test/qtsdk-2009.04/qt/src/gui/styles/qgtkstyle.cpp:948: undefined reference to `g_object_set_data'
.obj/release-shared/qgtkstyle.o: In function `.L2245':
/home/test/qtsdk-2009.04/qt/src/gui/styles/qgtkstyle.cpp:604: undefined reference to `g_object_get'
.obj/release-shared/qgtkstyle.o: In function `.L2241':
/home/test/qtsdk-2009.04/qt/src/gui/styles/qgtkstyle.cpp:636: undefined reference to `g_object_get'
.obj/release-shared/gtksymbols.o: In function `setup_gtk_widget':
/home/test/qtsdk-2009.04/qt/src/gui/styles/gtksymbols.cpp:430: undefined reference to `g_type_check_instance_is_a'
.obj/release-shared/gtksymbols.o: In function `setupGtkFileChooser':
/home/test/qtsdk-2009.04/qt/src/gui/styles/gtksymbols.cpp:725: undefined reference to `g_object_set'
/home/test/qtsdk-2009.04/qt/src/gui/styles/gtksymbols.cpp:726: undefined reference to `g_object_set'
.obj/release-shared/gtksymbols.o: In function `QGtk::openFilenames(QWidget*, QString const&, QString const&, QString const&, QString*, QFlags<QFileDialog::Option>)':
/home/test/qtsdk-2009.04/qt/src/gui/styles/gtksymbols.cpp:858: undefined reference to `g_object_set'
.obj/release-shared/gtksymbols.o: In function `getGConfString':
/home/test/qtsdk-2009.04/qt/src/gui/styles/gtksymbols.cpp:345: undefined reference to `g_type_init'
/home/test/qtsdk-2009.04/qt/src/gui/styles/gtksymbols.cpp:353: undefined reference to `g_object_unref'
.obj/release-shared/gtksymbols.o: In function `add_widget_to_map':
/home/test/qtsdk-2009.04/qt/src/gui/styles/gtksymbols.cpp:445: undefined reference to `g_type_check_instance_is_a'
.obj/release-shared/gtksymbols.o: In function `add_all_sub_widgets':
/home/test/qtsdk-2009.04/qt/src/gui/styles/gtksymbols.cpp:455: undefined reference to `g_type_check_instance_is_a'
.obj/release-shared/gtksymbols.o: In function `QGtk::initGtkWidgets()':
/home/test/qtsdk-2009.04/qt/src/gui/styles/gtksymbols.cpp:662: undefined reference to `g_signal_connect_data'
collect2: ld returned 1 exit status
make[1]: *** [../../lib/libQtGui.so.4.5.3] Error 1
make[1]: Leaving directory `/home/test/qtsdk-2009.04/qt/src/gui'
make: *** [sub-gui] Error 2