In order for our project to compile and link successfully the compiler option 'Treat WChar_t as built in type' has always been set to No.
Now we are adding a new feature through the use of a 3rd part library file. Through testing it appears that in order to use this library successfully the above compiler option must be set to Yes or I will get a linking error:
Error LNK2001 unresolved external symbol "public: int __thiscall BluetoothClient::Connect(unsigned short *)" (?Connect@BluetoothClient@@QAEHPAG@Z) cmj C:\dev\Products\cmj\cmj\VC7 Project\main.obj
The BluetoothClient::Connect method accepts one variable of type LPWSTR which is defined in terms of WCHAR which is defined in terms of wchar_t (winnt.h).
If I set the compiler option to yes it will link successfully (and run) in my test project. If I set it to yes for the real project it causes hundreds of C2664 compiler errors in other areas of the project where variables of type wchar_t and tchar, etc, are passed as arguments.
Does anyone have any ideas of how I could resolve this linking error without turning on the 'Treat WChar_t as built in type' compiler option?
I can provide more details if anyone asks.