Linker Error in Managed Wrapper when calling Method with CString Parameter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sebastian Dau

    #1

    Linker Error in Managed Wrapper when calling Method with CString Parameter

    Hello Newsgroup,

    I'm struggeling with wrapping a dll using MFC CStrings.

    Code:

    class CLASSEXPORTDLL_ API CClassExportDll {

    public:

    long InitMcs5 (HWND hWnd, CString path);

    }




    When I try to call that member method linker fails with:

    Error 3 error LNK2019: unresolved external symbol "public: long __thiscall
    CClassExportDll ::InitMcs5(stru ct HWND__ *,class ATL::CStringT<w char_t,class
    StrTraitMFC_DLL <wchar_t,clas s ATL::ChTraitsCR T<wchar_t >)"
    (?InitMcs5@CCla ssExportDll@@$$ FQAEJPAUHWND__@ @V?$CStringT@_W V?$StrTraitMFC_ DLL@_WV?$ChTrai tsCRT@_W@ATL@@@ @@ATL@@@Z)
    referenced in function "public: __clrcall
    CarlZeissWrappe r::Test::Test(v oid)" (??0Test@CarlZe issWrapper@@$$F Q$AAM@XZ)
    CarlZeiss.Wrapp er.obj

    Does anybody know how to successfully call an umanaged member function
    consuming a MFC CString from
    a C++/CLI mixed code project?

    Thanks, Sebastian Dau


Working...