PDA

View Full Version : qt-mac-opensource-src-4.1.0: linking problems



cfr
28th January 2006, 02:31
I am trying to build and install qt-mac-opensource-src-4.1.0 on Mac OS X 10.4.4 (PPC, 1.5GHz) with the latest Developer Tools.

Unpack source, ./configure (all default values), result tells me to use gmake, gmake install etc.

gmake, gmake install

All seems fine, but is not. I cannot compile QSA, for example, because the way Qt is installed and linked, all references/links to frameworks still reference the temporary *build* directory, rather than the installation directory. But that temporary directory no longer exists. The error does not affect references/links for executables, normal libraries etc.

For example, QtTest.pc looks like this:
-----
prefix=/usr/local/Trolltech/Qt-4.1.0
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
qt_config=lex yacc warn_on uic resources sdk release ReleaseBuild Release build_pass qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl stl build_all shared dll largefile stl absolute_library_soname dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build release ReleaseBuild Release build_pass hide_symbols debug_and_release build_all dll create_libtool create_pc explicitlib release ReleaseBuild Release build_pass no_autoqmake shared dll moc thread

Name: QtTest
Description: Qt Unit Testing Library
Version: 4.1.0
Libs: -L${libdir} -lQtTest -F/Users/myname/Documents/wedi-dod/n/qt-mac-opensource-src-4.1.0/lib -L/Users/myname/Documents/wedi-dod/n/qt-mac-opensource-src-4.1.0/lib -framework QtCore -L/Users/myname/Documents/wedi-dod/n/qt-mac-opensource-src-4.1.0/lib -lz -lm -framework ApplicationServices
Cflags: -I${includedir}
-----
(where "myname" is my user name; I've compiled in a build directory within my home directory, though Trolltech suggests using /tmp/..., but that is also intended to be only a temporary directory...)

The framework files themselves and many other files contain similar references.

I'm new to Qt, so please excuse me if I've missed something obvious. I am used to command line installs, however, but I'd appreciate any advice on this one. I've found some references to the problem on the net, but these mainly referenced older versions of Qt. Moreover, I didn't see any terribly promising solutions.

Thanks.

axeljaeger
29th January 2006, 20:20
I use Qt/Mac Commercial and usually unpack the sources to /Developer. Then I compile Qt and do a make install afterwards. Qt is now installed in /usr/local/Trolltech/Qt<version>

Be sure to use the qmake-executable in /usr/local/Trolltech/Qt<version>/bin to generate makefiles that use headers and libraries from this directory.

cfr
29th January 2006, 23:30
Thank you for the quick reply. I was wondering if you could clarify how, and when, to generate makefiles using /usr/local/Trolltech/Qt-4.1.0/bin/qmake, however. QTDIR is set to /usr/local/Trolltech/Qt-4.1.0, so QSA doesn't have any problems finding qmake, for example.

I'm also wondering if you could explain how this might help. I thought - very likely incorrectly - that so long as all the frameworks, /usr/local/Trolltech/Qt-4.1.0/lib/*.framework, etc. were referencing the build directory, that path setting etc. would not help. Is there some way that I am supposed to use qmake to fix the references/links in the installed frameworks etc.? I reread the installation/readme/platform notes etc. several times, but I'm wondering if I overlooked something critical, or if something is actually missing?

Thanks!

axeljaeger
30th January 2006, 16:13
QTDIR should not be needed any longer with Qt4. Everytime you generate a Makefile for your project, you should use qmake installed in /usr/local/Trolltech/Qt<whatever>. I did not had any problems with references on mac, but I also don't use the frameworks but the libraries themself.