unresolved external symbol w7/qt4.81 but not w10/qt5.10
-
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. -
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).
-
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. -
@bjarne
I don't know ifDUMPBIN
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. -
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? -
@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.