I had found out the solution on it, the issue was with the function parameter. From Visual C++ 8.0 (Visual Studio 2005) onwards, wchar_t is a native data type. You need to read the documentation for your library and pay attention to what you need to do with the .lib file, along with adding the header to your source.Earlier it was defined as unsigned short (16-bit) data. Hence at the time of linking when the linker searches for a function definition with parameter of type wchar_t*.
Code:
// test.cpp
// compile with: cl /GZ test.cpp /link /nod
void f() {}
int main ()
{
f();
return 0;
}
Bookmarks