August 24th, 2011, 08:33 AM
Conversion from Unmanaged Project to managed
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".
August 24th, 2011, 10:51 AM
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.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!