Skip to main content
GameDev.net gamedev.net
🔒 Locked

GCC with Visual Studio?

Started by Hedos Apr 12, 2005 at 6:58 PM 10 replies 42.2k views
Original Post
Hedos
Hedos
Hello, I'm using Visual Studio 2003 and I was wondering if it was possible to use the GCC compiler through the Visual Studio IDE? If it is, would it still be possible to debug code through the IDE? Otherwise, would there be a good alternative? Thanks a lot.
Saruman
Saruman
I am just curious why you would want to do such a thing? The GCC compiler is inferior to the supplied Microsoft compiler which is the reason it sparked my curiosity.
Spudder
Spudder
I can see some advantages in allowing testing of the code on multiple compilers from within a single IDE instead of having to re-create the project in something like Dev-C++ which will take time, and for large projects may not even be feasible.

It is possible to make the IDE use a different compiler as Intel did just that with their C++ compiler which integrated seamlessly into VS so you may need to write some sort of plug-in to allow the use of a different compiler/linker.
Strayfire
Strayfire
You can do it by selecting Makefile Project and setting up the command line yourself to use the gcc compiler.

edit: I think you'll have to use something like Msys to do the make, not MS's nmake.
darklordsatan
darklordsatan
Quote:
Original post by Saruman
The GCC compiler is inferior to the supplied Microsoft compiler


Im curious too. Why do you say it is inferior?

As Strayfire said, I also think youll need mingw to compile the makefile, I mean, makefiles nmake takes are different from those of gcc
Saruman
Saruman
Quote:
Original post by darklordsatan
Quote:
Original post by Saruman
The GCC compiler is inferior to the supplied Microsoft compiler


Im curious too. Why do you say it is inferior?


Simple. It produces slower code and doesn't have the code optimizations that the Microsoft compiler does. I wasn't trying to knock GCC because it is great if you don't have VSNET.. I have just never seen somebody trying to use GCC instead of a Microsoft compiler when they had one available because it isn't as good.. that is all. I mean with the VSNET compiler you get optimizations close to that of the Intel compiler along with being very standards compliant.
Fruny
Fruny
Quote:
Original post by Saruman
I have just never seen somebody trying to use GCC instead of a Microsoft compiler when they had one available because it isn't as good.. that is all.


I have both GCC and VC 7.1 - I predominantly use GCC.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
cignox1
cignox1
Once I heard of a guy that did it the following way: he wrote a simple program and made the IDE call it instead the vc compiler. This simple program took the parameters and called gcc translating the parameters from vc syntax to gcc syntax.
That said, you may be able to use gcc to compile, but I'm not sure that you will be able to debug. But I can be wrong: When I used Vc the last time (6.0), the debugging informations that the compiler was able to generate were more than one kind. I don't nothing for sure, but perhaps one of these and those generated by gcc are compatible and thus the vc debugger may be able to read them...

Anyway, if your only goal is to test the code with different compiler, perhaps you wont need debugging once you know that the code works (i.e you debug with vc and when it works you try to compile with gcc...)
JensB
JensB
try custom build steps
// Jens
Thunder_Hawk
Thunder_Hawk
Quote:
Original post by Saruman
I am just curious why you would want to do such a thing? The GCC compiler is inferior to the supplied Microsoft compiler which is the reason it sparked my curiosity.


Does VS .NET 2003 have VC++ built in? I asked because I recently discovered that I can get the Pro edition free through some program here at my university.
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Forma
Spudder
Spudder
Visual Studio includes many languages - C++, C#, J# and VB.NET so yeah
Thunder_Hawk
Thunder_Hawk
Quote:
Original post by Spudder
Visual Studio includes many languages - C++, C#, J# and VB.NET so yeah


Umm, cool [cool]....(wanders off to aquire a legit copy of $1000 software for free [wow])
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Forma

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.