S
sebastian.dau
Hello Newsgroup,
I have a link error that I did not manage to fix.
I basically consume a VC 8.0 C++ dll that exports a class with a
method containing CString declaration as follows:
class WarnErr
{
//...
CString WarnErr::getReadableCode (long nCode)
{
//...
}
When using the method in another project (C++/CLI) to write a RTCW,
the linker fails with the following error:
Error 2 error LNK2028: unresolved token (0A00000F) "public: static
class ATL::CStringT<char,class StrTraitMFC_DLL<char,class
ATL::ChTraitsCRT<char> > > __cdecl
lala_McsOOP::WarnErr::getReadableCode(long)" (?
getReadableCode@WarnErr@lala_McsOOP@@$$FSA?AV?$CStringT@DV?
$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@J@Z) referenced in
function "public: class System::String ^ __clrcall
lala::Spectrometer::RTCW::SpectrometerException::ToString(void)" (?
ToString@SpectrometerException@RTCW@Spectrometer@lala@@$$FQ$AAMP
$AAVString@System@@XZ) SpectrometerException.obj
Does anybody know how to fix this issue. Or is there any other good
practice passing strings from unmanaged libs tto managed libs?
Thanks for your help!
I have a link error that I did not manage to fix.
I basically consume a VC 8.0 C++ dll that exports a class with a
method containing CString declaration as follows:
class WarnErr
{
//...
CString WarnErr::getReadableCode (long nCode)
{
//...
}
When using the method in another project (C++/CLI) to write a RTCW,
the linker fails with the following error:
Error 2 error LNK2028: unresolved token (0A00000F) "public: static
class ATL::CStringT<char,class StrTraitMFC_DLL<char,class
ATL::ChTraitsCRT<char> > > __cdecl
lala_McsOOP::WarnErr::getReadableCode(long)" (?
getReadableCode@WarnErr@lala_McsOOP@@$$FSA?AV?$CStringT@DV?
$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@J@Z) referenced in
function "public: class System::String ^ __clrcall
lala::Spectrometer::RTCW::SpectrometerException::ToString(void)" (?
ToString@SpectrometerException@RTCW@Spectrometer@lala@@$$FQ$AAMP
$AAVString@System@@XZ) SpectrometerException.obj
Does anybody know how to fix this issue. Or is there any other good
practice passing strings from unmanaged libs tto managed libs?
Thanks for your help!