Conversion from Unmanaged Project to managed
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Conversion from Unmanaged Project to managed

  1. #1
    Join Date
    Aug 2011

    Conversion from Unmanaged Project to managed

    Hi ,
    I have an unmanaged project 'ProjA' and its corresponding Test "ProjAtest'.I converted both projects into managed by adding CLI enabled."ProjA" is compiling fine , but "ProjAtest" is throwing compile errors.Both were working fine as 'unmanaged.Whats the possible cause.The errors throwing are "error LNK2001: unresolved external symbol "public: virtual bool __thiscall" to all the methods in "ProjA".

    With regards

  2. #2
    Join Date
    Jun 2010

    Re: Conversion from Unmanaged Project to managed

    The information you provide about your project(s) is rather rudimentary, so the best I can do is make a qualified guess. The error message you quote sounds like you try to call methods as if they were unmanaged (native), but actually they have been defined as managed methods (if at all). Note that just turning on the CLR option in the project settings doesn't instantly turn your code into managed code. A class in a C++/CLI module remains unmanaged until you explicitly declare it as ref class (or, less common, value class). And in most cases you'll need to apply other changes to your code as well, since the feature sets of unmanaged and managed C++ differ, and also some features supported by both may require a different syntax.

    If you can't sort out your issue given the information above, you'll need to provide more information. In particular concrete code would probably be helpful.

    Ah, and... Welcome to CodeGuru!
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)