In Visual Studio for C/C++ code you have two options, managed code or unmanaged code.
Managed code compiles to Intermediate Language that will run on the Common Language Runtime (CLR) it’s a thing like the JVM for Java. It born with the .Net framework.
Unmanaged code compiles to machine code that runs directly on the computer.
My code needs to run on Windows XP and Windows Mobile, so I found that Windows mobile can have .Net Compact Framework and with this I will have the CLR.
I solved in two ways the issue:
1) With a code that uses a main like this _tmain() (it is to use the managed way) On the name of the project on the Solution explorer, in the general properties y changed the CLR from ‘no’ to ‘CLR old syntax’.
2)Change my code and don’t use _tmain use main() only like the old way (to use it unmanaged) and don’t use CLR properties.
It worked in both ways, so now I have to decide if I will program managed or unmanaged. mmmm I think managed maybe I will have less portability problems and I will not have to worry to free memory because I will have the garbage collector, the problem is that I will reuse some old fuctions I found in a page, I read that I can mix unmanaged and managed code, I think I will do that.
links to know more about:
http://www.developer.com/net/cplus/print.php/2197621
http://www.ondotnet.com/pub/a/dotnet/2003/03/03/mcppp2.html