Changing Visual Studio's Compiler

Started by
21 comments, last by daerid 22 years, 2 months ago
I''ve heard a few mentions of changing out the compiler that VC++ 6 uses from cl.exe to something else. I would like to do this, as I want to use VS''s interface ( which I love ), but I would like to conform to standard c++ I''ve tried doing it a few times, but never had any success. Has anybody done this successfully? If so, what compiler did you use? And how did you do it? Thanks!
daerid@gmail.com
Advertisement
*BUMP*
daerid@gmail.com
i did a search for "cl.exe" in the registry and found....

"HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Build System\Components\Platforms\Win32 (x86)\Tools\32-bit C/C++ Compiler for 80x86\Executable Path=cl.exe"


i''m not saying this is correct, but i looks good to me. if you do so, PLEASE export your registry, first. i do not to get flamed because i killed someone''s MSVS installation. thank you.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
I don''t how to do it. However, my guess is that it is difficult or impossible to do, since options vary so much between compilers. For instance, an option to specify the include path will be different between different compilers. I doubt Visual Studio is flexible or smart enough to work with a different compiler. Note again that this is just a guess.
Make files
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
quote:
Keep in mind that you can replace the MSVC compiler and STL implementation, so the real area of contention is the interface.


This is from the Code Warrior vs VC++ 6 thread
daerid@gmail.com
yep, make files.

I''ve no idea how to do it cos i haven''t looked at them but i''ve got VS .NET compiling my GameboyAdv programs using one of the handy little makfiles flying about the net (and gcc of course).

If all you want to do is use a different compiler but still target x86 it should be no problem, as long as you can find/create the makefile.



/* Ignorance is bliss, then you go and spoil it by learning stuff */
/* Ignorance is bliss, then you go and spoil it by learning stuff */
A clever way to do this would be:

Hide cl.exe. Try renaming it clx.exe.
Replace it with your own custom cl.exe. I recommend using VB and looking at what command line params are passed.
Figure out how to remap those parameters from VC to whatever compiler you are using.

I think ill try this when i get home...

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
The method Promit suggests is what the Intel compiler does.

I think there is an official addins interface defined too. The same stuff is what you use to make things like custom AppWizards. The SN Systems ProDG (GameCube & PS2) integration with DevStudio uses this method.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

quote:Original post by Promit
A clever way to do this would be:

Hide cl.exe. Try renaming it clx.exe.


Instead of doing this, it''s probably safer to remove the path to cl.exe from the IDE''s directories search path.

Tools->Options->Directories

Show directories for executable files. cl.exe should be under the VC98\bin directory (check in file explorer to confirm). If this directory is removed from the search sequence, the IDE should fail to spawn cl. Then, add in a new search path which includes the custom cl.exe. Presumably, the custom cl.exe will map the MS command-line options to the new compiler''s equivalent options and spawn the new compiler.

--
Very simple ideas lie within the reach only of complex minds.

This topic is closed to new replies.

Advertisement