S
Scott
We are trying to build a managed C++ static link library containing several classes which are members of a namespace. The build of this library seems to work OK. No errors.
We then try to use this library in a managed C++ application and get the following linker error.
LINK : error LNK2020: unresolved token (06000002) TestLib.TestClass::GetTemp
LINK : fatal error LNK1120: 1 unresolved externals
A verbose build listing shows that the linker is searching the lib - so it is referenced correctly in the build process.
"TestLib" is the name of the .lib file and is also the name of the namespace. "TestClass" is the name of the class and GetTemp is a method of that class.
It's the PERIOD between the namespace and the class that I believe is the problem. Its not proper namespace scoping syntax for C++. Is this a known linker problem? Is there a workaround?
Any help would be appreciated. I'm going bald over this one.
Scott L.
We then try to use this library in a managed C++ application and get the following linker error.
LINK : error LNK2020: unresolved token (06000002) TestLib.TestClass::GetTemp
LINK : fatal error LNK1120: 1 unresolved externals
A verbose build listing shows that the linker is searching the lib - so it is referenced correctly in the build process.
"TestLib" is the name of the .lib file and is also the name of the namespace. "TestClass" is the name of the class and GetTemp is a method of that class.
It's the PERIOD between the namespace and the class that I believe is the problem. Its not proper namespace scoping syntax for C++. Is this a known linker problem? Is there a workaround?
Any help would be appreciated. I'm going bald over this one.
Scott L.