Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [Resolved]qmake i386 vs i386:x86-64

    Tools
    3
    10
    7479
    Loading More Posts
    • 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.
    • K
      Kent88 last edited by

      I've recently upgraded my system to ubuntu 12.04 based Mint 13 KDE 64 bit, and I'm trying to test out qmake by compiling a c++ file via 'alphaPlusConnector.pro' (which I've successfully done on a past system) issuing these commands:

      $ qmake -o Makefile ./alphaPlusConnector.pro
      $ make

      and after 'make' I'm getting this error:

      g++ -m64 -Wl,-O1 -o alphaPlusConnector alphaPlusConnector.o -L/usr/lib/x86_64-linux-gnu -lmysqlpp -lQtGui -lQtCore -lpthread
      /usr/bin/ld: i386 architecture of input file `alphaPlusConnector.o' is incompatible with i386:x86-64 output
      collect2: ld returned 1 exit status
      make: *** [alphaPlusConnector] Error 1

      How can I remedy this issue?

      1 Reply Last reply Reply Quote 0
      • F
        franku last edited by

        Have you rebuilt the alphaPlusConnector.o with your current compiler, or did you only link the old object (from your past system)?

        This, Jen, is the internet.

        1 Reply Last reply Reply Quote 0
        • K
          Kent88 last edited by

          I re-ran qmake on 'alphaPlusConnector.pro' on the current system. I assume this rebuilt alphaPlusConnector.o?

          1 Reply Last reply Reply Quote 0
          • R
            raaghuu last edited by

            check if the qmake is 32bit or 64bit(just a wild guess, i m a windows user)

            1 Reply Last reply Reply Quote 0
            • F
              franku last edited by

              bq. I assume this rebuilt alphaPlusConnector.o?’

              qmake only rebuilds the makefiles. The *.o files are the output of your compiler. After invoking qmake you have to run

              • mingw32-make clean
              • and then mingw32-make

              in order to rebuild everything.

              This, Jen, is the internet.

              1 Reply Last reply Reply Quote 0
              • K
                Kent88 last edited by

                mingw32? Isn't that for making windows programs?

                1 Reply Last reply Reply Quote 0
                • F
                  franku last edited by

                  Yes, it is. I am a windows user as well. Did you try to rebuild the sourcecode? You have to use make I guess. :-)

                  This, Jen, is the internet.

                  1 Reply Last reply Reply Quote 0
                  • K
                    Kent88 last edited by

                    but make is where I'm having the problem, it wont let me run make without errors.

                    1 Reply Last reply Reply Quote 0
                    • F
                      franku last edited by

                      bq. I re-ran qmake on ‘alphaPlusConnector.pro’ on the current system. I assume this rebuilt alphaPlusConnector.o?

                      I would have guessed that you used an old build where the objects were already created by the older 32bit compiler. Now you are using the new 64bit tools, but the old objectfile still remains with its old timestamp in its old 32bit form. So make doesn't see the need for rebuilding the objectfiles.

                      The commands

                      make clean will remove the old objectfiles and
                      make will recompile the old files and link everything together.

                      qmake does not compile anything but the .pro file into makefiles (and some other things with ui files).

                      This, Jen, is the internet.

                      1 Reply Last reply Reply Quote 0
                      • K
                        Kent88 last edited by

                        Got it, PEBKAC.

                        You were close to right with the problem, franku.

                        Thanks for the replies, appreciate the help.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post