Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.16/5 (4 votes)
See more:
What is difference between making project under /clr with CLR Empty Project and between making only file under / clr ?


To make it clear :

if you click on Visual studio new -> visual C++ -> CLR empty project .. does all output EXE or DLL will be under CLR only ? or it will mixed ?

what's difference if i start Native Empty Project and make only specific files .cpp with /clr option ... like user interface sources


Another Clear :
1- if i need to make user interface only use /clr on cpp file or start normally CLR empty project ?
2- also i need to use DirectX for example ... with native project or same in CLR empty project or native source file !!!!


ANSWER MEEEEEE CHEEEEEEEEEERSSSSSSS !!! ^^
Posted
Updated 25-Apr-15 4:01am
v4
Comments
Philippe Mori 23-Apr-15 19:43pm    
Normally, you want to avoid specifying options at the file level as it can cause all kind of problems if your are not careful enough to ensure that an header is always included with the same set of options (or does not depends on options).

1 solution

Well, you can create two different projects and compare the resulting project files; it tells you everything. It looks like you are talking of two different ways to created the same thing. It does not matter where you start, only the current state (all options and so on) matters.

Now, /clr does not guarantee that your code is "pure CLR", it only allows you to write and build CLI code. The way to write pure CLI code is: under "/clr" option, use only managed "ref" types (and of course you can use all primitive types, but not unmanaged pointers); put each and every method in one of those "ref" types.

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900