I need to change compiler on VS

27,983

Solution 1

Short answer: no, you cannot change cl.exe (MS cc compiler) with gcc. Or mingw. (You can with a compatible compiler, like Intel C compiler)

Long answer: you don't need to to that. Use the static linked runtime library, and you don't have a dependency ms dlls anymore (see this answer: How do I make a fully statically linked .exe with Visual Studio Express 2005?)

Or redistribute the VC++ runtime with your app. It's free (http://www.microsoft.com/en-us/download/details.aspx?id=26999)

Solution 2

You don't need to change compiler - they need to download the Visual Studio 2010 redistributable: http://www.microsoft.com/en-gb/download/details.aspx?id=5555

Solution 3

I'm not sure when this became a feature in Visual Studio (probably wasn't one in 2013), but it is now possible to change the "Platform Toolset" - and thus the compiler - used by Visual Studio to other compilers like Clang/LLVM and GCC. I have been happily using Clang with VS2017 ever since the MSVC++ compiler bugged up with some 3rd party libraries.

Microsoft made a blog post on the installation instructions and how to switch.

Solution 4

In short: no. You can't simply use the GCC compiler in Visual Studio.

The long version: you can use a Makefile project to run GCC, but then you lose some of the benefits of using Visual Studio.

Share:
27,983
Giwrgos Tsopanoglou
Author by

Giwrgos Tsopanoglou

Loving programming , music and rubik's cube!

Updated on July 09, 2022

Comments

  • Giwrgos Tsopanoglou
    Giwrgos Tsopanoglou almost 2 years

    I have made a sudoku solver using SDL (for GUI) on VCpp 2010 IDE.

    The program compiles without errors and runs fine. However, i cannot pass the compiled executable on to some people because they don't have msvc dll on their pc.

    I thought i could use devc++ that compiles with GCC but this IDE is kinda buggy and just won't let me include some header files.I also have some problems setting up SDL expansions.

    So, is there a way to change VisualStudio compiler to GCC?

    I really need to stay with VS because it is easy to use and there is a lot of online support.

  • Giwrgos Tsopanoglou
    Giwrgos Tsopanoglou about 11 years
    Thanks for being straight forward. Is there an IDE as good as VS (or close to it ) that will help me get the job done?
  • Giwrgos Tsopanoglou
    Giwrgos Tsopanoglou about 11 years
    Thanks a lot sir, i will look into both of these options
  • Mahmoud Fayez
    Mahmoud Fayez about 11 years
    I do believe you can use the GCC compiler in VS check this out stackoverflow.com/questions/530831/… also I managed to use VC6 compiler with VS2005 successfully.
  • Tryer
    Tryer about 2 years
    Neither your answer, nor that blog post actually specify the exact steps needed to change the compiler toolchain. A proper answer would be: Click on this option, navigate to that tab, etc.