Results 1 to 5 of 5

Thread: OS X: linker not finding QtGui in framework...

  1. #1
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default OS X: linker not finding QtGui in framework...

    OS X 10.6 Snow Leopard
    Qt464, local build, carbon. Installed in '/usr/local/Trolltech/Qt-46-carbon'. Qt built as frameworks.
    Makefiles built from .pro file.
    --------
    Building a fairly complex suite of projects - in the final executable of one project, I'm getting this error: "Can't find QtGui.framework/Versions/4/QtGui". Unfortunately, it doesn't list the path to the framework...

    It's there, in the install loc lib location. I built a test project using QtGui and it finds it just fine. I've been crawling through the output makefiles on the bad project and noting the -F and -L specs look correct - they're pointing to the correct locations.

    I tried copying the frameworks to the /Library/Frameworks system location, just to see if maybe the linker is looking for them there - no dice, same error.


    So, I'm a bit stumped on this one - the only thing I can think of is that one (or more) of the pre-built libraries we're linking to has an rpath designation for the Qt libs that is different from ours (seems that shouldn't matter for a link - only execution...) - I'm going through them with otool now to see what's in there...


    Any thoughts appreciated.

    rickb

    Followup: Hmm. I'm noticing the external libs are built as 'universal' - mine are built only as i386. Wonder if that has anything to do with it? Maybe it's looking for the ppc versions of the lib and not finding that... Hate to do yet another build just to find out...
    Last edited by rickbsgu; 23rd September 2010 at 10:25.

  2. #2
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: OS X: linker not finding QtGui in framework...

    Ok, I tried rebuilding Qt as universal. Same error: "ld: file not found: QtGui.framework/Versions/4/QtGui"

    So providing the ppc parts didn't make any difference. I'm really stuck, now.

    Someone run into this?

    thanks,
    rickb
    ---------------------------------
    Followup: Happens building from commandline and from xcode - no difference.
    Last edited by rickbsgu; 24th September 2010 at 11:01.

  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: OS X: linker not finding QtGui in framework...

    why you need to build Qt? what about using the sdk. I too had many problems with qt builds on mac, finally using sdk for all.

  4. #4
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: OS X: linker not finding QtGui in framework...

    Because it's the only way to support multiple versions of Qt on the Mac.

    It built fine, it installs fine, it's in the right place, and a demo project can link to it just fine.
    The problem is with this more complex project that brings in a lot of external libs.

    I think it's the internal refs in the external dylibs that is causing the problem - I have to go through them all and see what's up with those, I guess.

  5. #5
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: OS X: linker not finding QtGui in framework...

    Voila! It is the embedded rpaths in the external dylibs and frameworks.

    I wrote a python tool to straighten those out so they're self-consistent and point to the correct dependencies, and the '<library> not found' error went away.

    Now, I only have a small problem with Xerces.... (ptui...)

Similar Threads

  1. QtBrowserPlugin without QtGui.dll?
    By anupamgee in forum Qt Programming
    Replies: 1
    Last Post: 13th August 2010, 14:52
  2. qt-4.7 pkgconfig QtGui.pc incorrectly includes Carbon framework, when built w/cocoa
    By elvisjohndowson in forum Installation and Deployment
    Replies: 1
    Last Post: 20th July 2010, 19:39
  3. [QtGui] Problem with a QTextBrowser
    By Auliyaa in forum Qt Programming
    Replies: 2
    Last Post: 19th February 2010, 07:51
  4. Finding window, linker error
    By Khal Drogo in forum Qt Programming
    Replies: 7
    Last Post: 14th March 2008, 12:49
  5. using QtGui
    By nupul in forum Qt Programming
    Replies: 5
    Last Post: 7th April 2006, 12:36

Tags for this Thread

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.