Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCC with Visual Studio?

How hard would it be to use GCC instead of VC++ from within Visual Studio 2008? Obviously, some of the keywords won't match, and some may not get syntax highlighting (unless you made a new language service).

Is this what a 'makefile project' is for, pretty much?

like image 846
TraumaPony Avatar asked Oct 19 '08 04:10

TraumaPony


People also ask

Can you use GCC in Visual Studio?

In addition to the Microsoft Visual C++ compiler that many of you are likely familiar with, Visual Studio 2017 also supports Clang, GCC, and other compilers when targeting certain platforms.

Can I use Visual Studio to compile C?

The Visual Studio build tools include a C compiler that you can use to create everything from basic console programs to full Windows Desktop applications, mobile apps, and more.


2 Answers

There is no GCC plugin for Visual Studio as the one for example for Intel C++, which allows Intel's compiler to be used as a drop-in replacement for Visual C++.

You can use Makefile projects which allows you to use any external tool you like (make, SCons, jam, whatever) to do your build. If you don't like Makefiles, you may want to look at CMake which allows you to generate Makefiles or Visual Studio projects from a much simpler description. This also means that you're not bound to Makefiles or Visual Studio projects, but can switch between them as you like.

like image 142
JesperE Avatar answered Sep 20 '22 04:09

JesperE


See the thread "Use a gcc port to build programs with Visual Studio" in MSDN's forums for similar discussion.

You can use makefiles and also use WinGDB for better integration (including debugging)

like image 35
Afriza N. Arief Avatar answered Sep 21 '22 04:09

Afriza N. Arief