views:

1768

answers:

1

trying to wrap a native cpp class using managed c++ class.

all looks good but for some reason it wont compile.

getting the following linker errors:

Error 25 error LNK2028: unresolved token (0A0002CE) Error 27 error LNK2019: unresolved external symbol

Any ideas how do I fix this one ? :\

well, here is a full error of one of the functions:

Error 20 error LNK2028: unresolved token (0A0002CF) "public: bool __thiscall RCSclient::ResumeChannel(char *,int,__int64)" (?ResumeChannel@RCSclient@@$$FQAE_NPADH_J@Z) referenced in function "public: bool __clrcall RCSClientWrapper::RCSclientWrapper::ResumeChannel(class System::String ^,int,class System::DateTime ^)" (?ResumeChannel@RCSclientWrapper@RCSClientWrapper@@$$FQ$AAM_NP$AAVString@System@@HP$AAVDateTime@4@@Z) RCSClientWrapper.obj RCSClientWrapper

Tried to add the user32.lib with no results..

Ofer

+1  A: 

C++/CLI allows you to mix in native C++ pretty much at will, but using C++/CLI causes your app to depend on the .NET framework.

The reason is your C++/CLI project doesn't have some libs (user32.lib, in example) setup in the linker input is that the .NET framework already provides similar services, and the IDE assumes that you want to prefer those to the older, native ones.

Check your project and add reference to the corresponding library.

Vimvq1987