I have VC ++ code (built using VS2008) that uses some static libraries (* .lib files statically linked at compile time).
For ease of understanding, we send my EXE code as "AAA.EXE" and refer to the lib files as "A.lib", b.lib, etc.
Both AAA.EXE and static library code are built using VS2008.
I see that my "AAA.EXE" works fine in the 32-bit version and shows below linker errors when AAA.EXE is built in 64-bit mode.
Of course, I restored the static libraries in 64-bit mode and provided the lib path in my AAA.EXE as follows: "Project configuration properties corresponding to AAA.EXE β Linker β General / Input".
This linker error has really bothered me for a long time. Any help is appreciated.
Logger.lib(Loggerr.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall CWTTLogger::CWTTLogger(void)" ( __imp_??0CWTTLogger@ @ QAE@XZ ) 1>Logger.lib(Logger.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CWTTLogger::~CWTTLogger(void)" ( __imp_??1CWTTLogger@ @ UAE@XZ ) 1>Logger.lib(Logger.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: long __thiscall CWTTLogger::FunctionA(unsigned short *,long *)" ( __imp_?FunctionA@CWTTLogger @@ QAEJPAGPAJ@Z ) 1>Logger.lib(Logger.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: long __thiscall CWTTLogger::FunctionB(unsigned short *,long)" ( __imp_?FunctionB@CWTTLogger @@ QAEJPAGJ@Z ) 1>Logger.lib(Logger.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: long __thiscall CWTTLogger::FunctionC(unsigned short *,unsigned long,unsigned short *,long)" ( __imp_?FunctionC@CWTTLogger @@ QAEJPAGK0J@Z ) 1>Logger.lib(Logger.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: long __cdecl CWTTLogger::FunctionD(unsigned long,long,...)" ( __imp_?FunctionD@CWTTLogger @@QAAJKJZZ) 1>Logger.lib(Logger.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: long __thiscall CWTTLogger::FunctionE(unsigned short *,long)" ( __imp_?FunctionE@CWTTLogger @@ QAEJPAGJ@Z ) 1>C:\Users\User1\Documents\XYZ\Code\64bit\aaa.exe: fatal error LNK1120: 7 unresolved externals
Also add ::
I made 2 changes in the settings to make AAA.exe code 64-bit from 32-bit :: 1) 
2) 
Of course, the code is compatible for both 32-bit and 64-bit. Are these 2 configuration changes in VC2008 completed to make the 32-bit AAA.exe code a 64-bit build?
Looking at another stackoverflow link, I see that the project settings β Linker-> Advanced-> Target use one more setting: the default value is "not set" and if I create the target machine == "MACHINEx64", I get another error i got before:
"fatal error LNK1112: module type of module" X86 "conflicts with target machine type" x64 ""
I really donβt have clarity if I have to set the Target Machine field in the linker option as Not Specified or MACHINEx64?
If it is YES, I need to figure out how to fix the problem.