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. unresolved external symbol w7/qt4.81 but not w10/qt5.10
QtWS25 Last Chance

unresolved external symbol w7/qt4.81 but not w10/qt5.10

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 1.5k Views
  • 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
    bjarne
    wrote on last edited by
    #1

    I wrote a small test app for finding a serial port using FTDI drivers, and I have the following problem.
    Using Windows 10 and qt5.10, everything compiles and runs as expected, but when compiling the exact same project (copying the complete project structure), i get an "unresolved external symbol....." for each of the calls to the FTDI ftd2xx.lib. I did a "clean all - qmake - Rebuild all" after moving the project.
    I have googled a lot, and even created the same project directly in Qt 4.8.1, with the same result. I can attach the program, but I think the problem is in the linking or versions of the lib, maybe.
    I am not sure what my next step to track this down should be, any help or suggestions are welcome.

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

      Is ftd2xx.lib compiled using the same compiler as your application?

      Since you say it compiles and runs OK in one place, I suspect your paths are wrong after moving the project (on the same PC?). Check them in your .pro file (the LIBS variable).

      (Z(:^

      1 Reply Last reply
      2
      • B Offline
        B Offline
        bjarne
        wrote on last edited by
        #3

        Thank you for the response.
        The ftd2xx.lib comes from FTDI, so I don't know how it was compiled.
        I am running in two vm's, one is windows 7 and qt 4.8.1, the other is Windows 10 and qt 5.10. I copied the whole project directory from one vm to the other, so the structure is the same, and the .pro file is the same, and the LIBS points to where the ftd2xx.lib is in both cases.

        aha_1980A JonBJ 2 Replies Last reply
        0
        • B bjarne

          Thank you for the response.
          The ftd2xx.lib comes from FTDI, so I don't know how it was compiled.
          I am running in two vm's, one is windows 7 and qt 4.8.1, the other is Windows 10 and qt 5.10. I copied the whole project directory from one vm to the other, so the structure is the same, and the .pro file is the same, and the LIBS points to where the ftd2xx.lib is in both cases.

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @bjarne But the compiler you use for Qt 4.8 and Qt 5.10 is surely not the same. Can you give us this information?

          Qt has to stay free or it will die.

          1 Reply Last reply
          1
          • B bjarne

            Thank you for the response.
            The ftd2xx.lib comes from FTDI, so I don't know how it was compiled.
            I am running in two vm's, one is windows 7 and qt 4.8.1, the other is Windows 10 and qt 5.10. I copied the whole project directory from one vm to the other, so the structure is the same, and the .pro file is the same, and the LIBS points to where the ftd2xx.lib is in both cases.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #5

            @bjarne
            I don't know if DUMPBIN still works/exists? E.g. https://stackoverflow.com/questions/305287/how-to-see-the-contents-of-windows-library-lib. To see whether the two versions of FTDI ftd2xx.lib are in the same "format" at least, and have the same symbol exports.

            1 Reply Last reply
            0
            • B Offline
              B Offline
              bjarne
              wrote on last edited by
              #6

              One additional note, I also recreated a new project from scratch in the win7/qt4.8.1 vm, and here I used the 'add Library' function to add the library. The .pro file is similar the the other project, and I still get the same errors.

              @aha_1980: I checked the compilers in both installations:
              win7/qt4.8.1 Uses Microsoft Visual C++ compiler 10.0(x86) MSVC
              win10/qt5.10 Has a bunch Microsoft compilers installed, but under Kits/autodetected it lists: Desktop Qt 5.10.1 MSVC2015 64-bit (default).
              So maybe the compiler is the problem, does the .lib gets compiled? Or is it a 32-bit vs 64-bit problem?

              aha_1980A 1 Reply Last reply
              0
              • B bjarne

                One additional note, I also recreated a new project from scratch in the win7/qt4.8.1 vm, and here I used the 'add Library' function to add the library. The .pro file is similar the the other project, and I still get the same errors.

                @aha_1980: I checked the compilers in both installations:
                win7/qt4.8.1 Uses Microsoft Visual C++ compiler 10.0(x86) MSVC
                win10/qt5.10 Has a bunch Microsoft compilers installed, but under Kits/autodetected it lists: Desktop Qt 5.10.1 MSVC2015 64-bit (default).
                So maybe the compiler is the problem, does the .lib gets compiled? Or is it a 32-bit vs 64-bit problem?

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @bjarne said in unresolved external symbol w7/qt4.81 but not w10/qt5.10:

                So maybe the compiler is the problem, does the .lib gets compiled?

                It does get linked (it's a linker include file).

                Or is it a 32-bit vs 64-bit problem?

                Very likely.

                Qt has to stay free or it will die.

                1 Reply Last reply
                3
                • B Offline
                  B Offline
                  bjarne
                  wrote on last edited by
                  #8

                  @aha_1980: Thanks, that was the problem, my windows is 64-bit in both cases, but I am compiling to a 32-bit application (it goes into a very old application). The FTDI files were for 64-bit.

                  1 Reply Last reply
                  1

                  • Login

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