[solved]Use x64 DLL
-
@catalin1122 said:
TestDllToQT.lib
It's impossible, you need to have your TestDllToQT.lib compile in the same architecture.
-
@Franckynos
Is there a way to make my Qt project x64 and compatible with the dll? I could compile the dll in x32 but I would prefer not to. -
Use a 64bit Qt build
-
@catalin1122
http://tver-soft.org/qt64Here there was pre-build qt x 64 but the server not respond. :(
You need to find (or compile) qt in 64 bits(http://sourceforge.net/projects/qt64ng/files/qt/x86-64/5.4.2/mingw-5.1/seh/)
-
Hi catalin1122,
when linking against your dll you have to import the symbols, when creating the dll the symbols have to be exported this is usually done with some macros like in the following link - http://stackoverflow.com/questions/538134/exporting-functions-from-a-dll-with-dllexport -
@belab
Hi,
I did that, except the partextern "C"
.When I import the DLL how do I do it in Qt? Now I do it statically (in *.pro) and I get those errors. The thing is that when I compile the DLL on x32 it works the way I do it. But not in x64.
-
You just defined the export not import. Qt's Creating Shared Library documentation chapter explain how to do it properly
-
@SGaist @hskoglund @belab @Franckynos
Thank you for helping me!You were right, I did not import the symbols.
I added this :
#ifdef GAME_EXPORTS # define GAME_API __declspec(dllexport) #else # define GAME_API __declspec(dllimport) #endif
to my DLL code and now everything works.
Have a nice day, you rock! :-)