Results 1 to 4 of 4

Thread: qt-mac-opensource-src-4.1.0: linking problems

  1. #1
    Join Date
    Jan 2006
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default qt-mac-opensource-src-4.1.0: linking problems

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: qt-mac-opensource-src-4.1.0: linking problems

    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.
    It's nice to be important but it's more important to be nice.

  3. #3
    Join Date
    Jan 2006
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: qt-mac-opensource-src-4.1.0: linking problems

    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!

  4. #4
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: qt-mac-opensource-src-4.1.0: linking problems

    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.
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. Linking problems with QT4 under Windows
    By Ancalagon in forum Qt Programming
    Replies: 2
    Last Post: 8th September 2008, 14:29
  2. problems installing Qt opensource with msvc2008 support
    By odin1985 in forum Installation and Deployment
    Replies: 6
    Last Post: 24th May 2008, 10:06
  3. Linking problems with multiply defined symbols
    By JimBrown in forum Qt Programming
    Replies: 5
    Last Post: 2nd March 2007, 17:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.