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. [SOLVED]Configuring Qt for i386 architecture.
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]Configuring Qt for i386 architecture.

Scheduled Pinned Locked Moved General and Desktop
11 Posts 3 Posters 4.0k 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.
  • ealioneE Offline
    ealioneE Offline
    ealione
    wrote on last edited by
    #1

    I am on mac and I am trying to link a library (.dylib) in my own app. The library though was created for i386 architecture and as a result I get the warning

    @file was built for i386 which is not the architecture being linked (x86_64)@

    and the error

    @symbol(s) not found for architecture x86_64@

    How can I configure Qt to build for i386 so I can successfully link the library?

    EDIT
    I have no problem building with qmake if that will help.

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

      Please remember Apple is trying to deprecate the i386 architecture, they recommend building everything in the pseudo 64 bit.

      To configure Qt for 32 bit, you need to pass this to configure script:
      @
      configure -arch x86
      @

      (Z(:^

      1 Reply Last reply
      0
      • ealioneE Offline
        ealioneE Offline
        ealione
        wrote on last edited by
        #3

        I see, but unfortunately the library was not build by me so there is nothing I can do about that.
        What is the 'configure script'? is it the .pro file?

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

          Ah, ok.

          You need to compile Qt source code (the whole Qt framework) in 32 bit. It will not work otherwise. And one of the steps of building Qt is running it's configure script. The whole process is described here: "link":http://qt-project.org/wiki/Building_Qt_5_from_Git.

          Then you can use that version to build your project and link it with a 32 bit library.

          (Z(:^

          1 Reply Last reply
          0
          • ealioneE Offline
            ealioneE Offline
            ealione
            wrote on last edited by
            #5

            Got it, thank you.

            1 Reply Last reply
            0
            • ealioneE Offline
              ealioneE Offline
              ealione
              wrote on last edited by
              #6

              After trying your suggestion I got this message while configuring Qt

              NOTICE: The -arch and -host-arch options are obsolete.

              Qt now detects the target and host architectures based on compiler
              output. Qt will be built using x86_64 for the target architecture
              and x86_64 for the host architecture (note that these two
              will be the same unless you are cross-compiling).

              Would an older version do the trick?

              1 Reply Last reply
              0
              • ealioneE Offline
                ealioneE Offline
                ealione
                wrote on last edited by
                #7

                Just tried version 4.8 and it is not compatible with my version of OSx, tough luck :)

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Hi,

                  What version of 4.8 and OS X are you using ? 4.8.6 should be good for both 10.9 and 10.10

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • ealioneE Offline
                    ealioneE Offline
                    ealione
                    wrote on last edited by
                    #9

                    Well I had 4.8.2 since I could not find the source distribution for any other 4.8.x version and my OS version is 10.9.5. I don't have the exact message I got though, it was something on the lines of Qt is not compatible with my version of OS.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      The sources of 4.8.6 can be found "here":http://download.qt-project.org/official_releases/qt/4.8/4.8.6/ or you can also use git and clone the repository

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • ealioneE Offline
                        ealioneE Offline
                        ealione
                        wrote on last edited by
                        #11

                        I will give this a try as soon as I can, and try to build the 32bit version drivers also, but for now I am struggling with the IBMs' db2 drivers still. Have you read my thread about it, I can't even get them to compile.

                        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