Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Build 32bit-only with qt 4.8.1 and xcode-4.3.2
Qt 6.11 is out! See what's new in the release blog

Build 32bit-only with qt 4.8.1 and xcode-4.3.2

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 3.5k 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.
  • W Offline
    W Offline
    whoops
    wrote on last edited by
    #1

    I have a project that won't build for x86_64. The reason is that the code casts pointers to 32bit integers, which works in 32bit mode but not in 64bit mode, so I get the error "uint32 loses precision", so I am limited to compile in 32bit only, as I can't patch the code.

    My build system is osx 10.7 (lion), with xcode 4.3.2, and qt-4.8.1 built from source with arches i386 and x86_64.

    No matter how I modify my project file, after running: qmake *.pro, the resulting Makefile contains the bad words: -arch x86_64 -Xarch_x86_64

    I have tried the following:

    @
    QT += network
    QT -= gui
    CONFIG += release thread static rtti link_prl
    macx {
    CONFIG -= x86_64 ppc64
    CONFIG += x86
    ARCHES -= x86_64
    ARCHES += i386
    DEFINES += NO_KEY_T_DEFINED
    LIBS += -framework CoreFoundation
    DESTDIR = ../../../MY/ProgramFiles/MyApp.app/Contents/Resources/Data/
    }
    @

    I have used lipo -arch <qt archive paths> to verify they contain i386 and x86_64

    [EDIT: code formatting, please wrap in @-tags, Volker]

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Have you tried compiling Qt with -arch x86 only? I did that and get clean 32 bit builds.

      (Z(:^

      1 Reply Last reply
      0
      • W Offline
        W Offline
        whoops
        wrote on last edited by
        #3

        I tried compiling Qt with -arch x86 only. That worked. I used the resulting qt to build a project with ARCH i386. But I was not able to run the resulting APP on lion. I haven't figured that out yet. But my initial question still stands, What do I feed a .pro, for: qmake my.pro to create a Makefile that only builds i386 targets.

        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