Trying to compile and execute a C++ project in VS2005 I ran into a linker problem. After some investigation it turned out that the calling convention was not what it was supposed to be for the functions used in the program. I changed the option for the calling convention from /Gd to /Gz. I needed __stdcall to be made.
After that I got this error message:
Error 1 Command line error D8016 : '/clr:pure' and '/Gz' command-line options are incompatible
The command line now looks like this:
/Od /I "C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /FD /EHa /MDd /Yu"stdafx.h" /Fp"Debug\SocketsCplus.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /Zi /clr:pure /Gz /TP /errorReport:prompt /FU "c:\WINNT\Microsoft.NET\Framework\v2.0.50215\System.dll" /FU "c:\WINNT\Microsoft.NET\Framework\v2.0.50215\System.Data.dll" /FU "c:\WINNT\Microsoft.NET\Framework\v2.0.50215\System.Drawing.dll" /FU "c:\WINNT\Microsoft.NET\Framework\v2.0.50215\System.Windows.Forms.dll" /FU "c:\WINNT\Microsoft.NET\Framework\v2.0.50215\System.XML.dll"
My problem is that I cannot edit it. The browser does not allow me to make the display editable. I tried many tricks to no avail. What is the workabout for this It seems the command line does allow additions but no deletions. Weird.
Thanks.

unable to edit command line for a project
John Vivoda
You can do that by going to the project properties --> Configuration Properties --> C/C++ --> Code Generation and set the Runtime Library field to Multi-threaded DLL (/MD) or Multi-threaded Debug DLL (/MDd).
2) If you don't want to compile with /CLR, you can get rid of the switch by going to the project properties --> Configuration Properties -->General and set the Common Language Runtime Support to No Common Language Runtime Support.
Thanks,
Ayman Shoukry
VC++ Team
Nasir Javed
Thanks,
Ayman Shoukry
VC++ Team
pfelsted
Then I tried to compile.
You can see that the error message claims that the language option was /clr:pure which is not the case at all. It is /clr. CLR:PURE is a separate option in there. Now it conflicts with /Gz that is __stdcall calling convention and I need precisely that because I was getting a linkage errors before on that account.
As I said I tried many other combinations before to try to get out of the loop but always failed. I will post more examples.
I need your help.
Thanks.
Todd B. Schroeder
Were you able to resolve this problem
callaway59
What is going on
dadomingues
I removed the /clr:pure completely. However I am still getting an error message as IF IT IS STILL THERE:
Error 3 Command line error D8016 : '/Gz' and '/clr:pure' command-line options are incompatible
This is a copy of my command line:
/Od /I "C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /FD /MDd /Yu"stdafx.h" /Fp"Debug\SocketsCplus.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /Z7 /Gz /TP /prefast /errorReport:prompt
I do not see any CLR:pure in there at all. It has been removed from the database.
Help please.
Thanks.
Mike_Vere
I could not wait for the answer and kept tinckering wih parameters feverisly. I think I exhausted all possible combinatins. Every combination seems to cause a compler time error similar to the one posted before.
Next tme I post a message I will copy the .log file as a whole. Now I am giving you a copy of the log rom my latest permutation of parameters. It is NOT the one you've requested. I also blackened my first and last names.
I simply cannot get rid of /clr in various incarnations. It often pops up by itself if I choose no CLR support.
I may take a break until tomorrow to proceed. Perhaps new ideas will come up. I would appreciate any help, though.
thanks.
jsminch
Take a look at the command line. -clr:pure is excluded but it still gives me an error!
JohnnieMac
Error 1 Command line error D8016 : '/MT' and '/clr' command-line options are incompatible.
Nick Hustak
Thanks,
Ayman Shoukry
VC++ Team