Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Compiling on MacOSX
Qt 6.11 is out! See what's new in the release blog

Compiling on MacOSX

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 3.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brit7
    wrote on last edited by
    #1

    I'm having trouble building a QT application on Mac OSX.

    When I compile my application, I get down to the linking section and get a bunch of errors. I tried looking up similar errors online, and it looks like a mismatch between the platform I'm building for and the platform the libraries were compiled on. Unfortunately, I don't know how to fix it. I tried compiling the application for different platforms (i386, ppc, x86_64) using both Debug and Release configurations, but it doesn't seem to make any difference. Do I need to link to something other than the frameworks? I get errors for every Qt framework that I'm linking to.

    My system: Running Mac OSX 10.6.8, Intel Core Duo (64-bit processor), XCode 3.2.4. I'm running the most recent version of Qt - i.e. 4.8 (downloaded it this week)

    The errors involve linking to the frameworks -
    Link ...
    In /Users/Brit/Develop/Qt-4.8/Desktop/Qt/474/gcc/lib/QtNetwork.framework/QtNetwork, file was built for unsupported file format which is not the architecture being linked (i386)
    In /Users/Brit/Develop/Qt-4.8/Desktop/Qt/474/gcc/lib/QtWebKit.framework/QtWebKit, file was built for unsupported file format which is not the architecture being linked (i386)
    In /Users/Brit/Develop/Qt-4.8/Desktop/Qt/474/gcc/lib/phonon.framework/phonon, file was built for unsupported file format which is not the architecture being linked (i386)
    In /Users/Brit/Develop/Qt-4.8/Desktop/Qt/474/gcc/lib/QtXml.framework/QtXml, file was built for unsupported file format which is not the architecture being linked (i386)
    In /Users/Brit/Develop/Qt-4.8/Desktop/Qt/474/gcc/lib/QtOpenGL.framework/QtOpenGL, file was built for unsupported file format which is not the architecture being linked (i386)
    In /Users/Brit/Develop/Qt-4.8/Desktop/Qt/474/gcc/lib/QtGui.framework/QtGui, file was built for unsupported file format which is not the architecture being linked (i386)
    In /Users/Brit/Develop/Qt-4.8/Desktop/Qt/474/gcc/lib/QtCore.framework/QtCore, file was built for unsupported file format which is not the architecture being linked (i386)

    I've also tried using the frameworks in:
    "/Users/Brit/Develop/Qt-4.8/Desktop/Qt/4.8.0/gcc/lib/" instead of
    "/Users/Brit/Develop/Qt-4.8/Desktop/Qt/474/gcc/lib/"

    A few places said that they could solve a similar linking problem (with libs) by rebuilding them, though that seems like a lot of work, and I don't know why this shouldn't work out of the box since I'm not doing anything too complicated.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Brit7
      wrote on last edited by
      #2

      I think I have it figured out. My *.pro file included a section to build the i386, ppc, and x86_64 architectures when I only wanted the x86_64 architecture built.

      I fixed this by replacing "CONFIG += x86 ppc" with "CONFIG += x86_64" in the *.pro file, which is used to create the xcodeproj file.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved