C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 06-05-2006, 03:15 PM   #1
Registered User
 
Join Date: Jun 2006
Posts: 3
visual studio IDE w/ different compiler

I am hoping it is possible to use the Visual Studio IDE with a different compiler. I would like to configure visual studio to use the MinGW compiler instead of its own.

(The project I am doing right now contains code that does not compile in Visual Studio but does under MinGW.
tooKool4School6 is offline   Reply With Quote
Old 06-05-2006, 03:34 PM   #2
Devil's Advocate
 
SlyMaelstrom's Avatar
 
Join Date: May 2004
Location: Out of scope
Posts: 3,735
I'm not sure you can configure Visual Studios to do that. You'll have to write your code in VS, save it, then compile in MinGW seperately.

In any event, VS is pretty standard as far as compilation goes. I understand they give a lot of weird warnings when you use the C standard library, but if you can't compile your code in it, then you most likely aren't writing standard code.
__________________
Terms of Service
By quoting or replying directly to this post, you consent to the fact that all of the information in the post above is completely accurate and highly intelligent and no comments will be made towards its validity, thoughtlessness, and/or grammatical structure.

Violators will be prosecuted to the fullest extent of the law.
SlyMaelstrom is offline   Reply With Quote
Old 06-05-2006, 03:37 PM   #3
(?<!re)tired
 
Mario F.'s Avatar
 
Join Date: May 2006
Location: Portugal
Posts: 5,220
There's no way that I know of. Unless Visual Studio gives access to its object model and someone writes a pluggin or extension.

I do find it somewhat strange though that you can't use code that compiles in MinGW. Could you be more specific?
__________________
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.


Mario F. is offline   Reply With Quote
Old 06-05-2006, 04:08 PM   #4
Frequently Quite Prolix
 
dwks's Avatar
 
Join Date: Apr 2005
Location: Canada
Posts: 7,629
Quote:
In any event, VS is pretty standard as far as compilation goes. I understand they give a lot of weird warnings when you use the C standard library, but if you can't compile your code in it, then you most likely aren't writing standard code.
I disagree. Try this code in Visual C++ 6:
Code:
#include <iostream>

int main(void) {
    for(int x = 0; x < 10; x ++) {}
    for(int x = 0; x < 10; x ++) {}

    return 0;
}
(Although I must admit I've never tried a newer version of that compiler, so perhaps the latest versions do a better job.)
__________________
dwk

Seek and ye shall find. quaere et invenies.

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell


Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net

My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, etc.

New project: nort
dwks is offline   Reply With Quote
Old 06-05-2006, 04:11 PM   #5
(?<!re)tired
 
Mario F.'s Avatar
 
Join Date: May 2006
Location: Portugal
Posts: 5,220
The for loop scope has been fixed for a while (thank goodness!). For backward compatibility with previous versions of visual studio it still lingers on as a wart on the compiler options. But it is turned on by default.
__________________
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.


Mario F. is offline   Reply With Quote
Old 06-05-2006, 04:30 PM   #6
Devil's Advocate
 
SlyMaelstrom's Avatar
 
Join Date: May 2004
Location: Out of scope
Posts: 3,735
That compiles in Visual Studios 2005, but if you say you've seen problems with it, perhaps the version the OP is using is the issue.
__________________
Terms of Service
By quoting or replying directly to this post, you consent to the fact that all of the information in the post above is completely accurate and highly intelligent and no comments will be made towards its validity, thoughtlessness, and/or grammatical structure.

Violators will be prosecuted to the fullest extent of the law.
SlyMaelstrom is offline   Reply With Quote
Old 06-05-2006, 04:34 PM   #7
Frequently Quite Prolix
 
dwks's Avatar
 
Join Date: Apr 2005
Location: Canada
Posts: 7,629
Possibly. But there's lots of code that compiles under MinGW but not under Microsoft compilers:
Code:
mkdir("tmp");
chdir("../bin");
stricmp(x, y);
__________________
dwk

Seek and ye shall find. quaere et invenies.

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell


Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net

My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, etc.

New project: nort
dwks is offline   Reply With Quote
Old 06-05-2006, 04:42 PM   #8
(?<!re)tired
 
Mario F.'s Avatar
 
Join Date: May 2006
Location: Portugal
Posts: 5,220
err... that's not standard c++
__________________
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.


Mario F. is offline   Reply With Quote
Old 06-05-2006, 04:48 PM   #9
Frequently Quite Prolix
 
dwks's Avatar
 
Join Date: Apr 2005
Location: Canada
Posts: 7,629
Exactly. The OP never said his/her code was standard C++.
__________________
dwk

Seek and ye shall find. quaere et invenies.

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell


Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net

My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, etc.

New project: nort
dwks is offline   Reply With Quote
Old 06-05-2006, 04:49 PM   #10
Devil's Advocate
 
SlyMaelstrom's Avatar
 
Join Date: May 2004
Location: Out of scope
Posts: 3,735
...but I did. In the part you quoted, in fact.
Quote:
Originally Posted by SlyMaelstrom
In any event, VS is pretty standard as far as compilation goes. I understand they give a lot of weird warnings when you use the C standard library, but if you can't compile your code in it, then you most likely aren't writing standard code.
I just recenly got VS 2005, so I don't know all the "in"s and "out"s of it. There may be standard code that won't compile in modern VS, but I haven't heard anything about it. I couldn't say I'm a reliable source on it.
__________________
Terms of Service
By quoting or replying directly to this post, you consent to the fact that all of the information in the post above is completely accurate and highly intelligent and no comments will be made towards its validity, thoughtlessness, and/or grammatical structure.

Violators will be prosecuted to the fullest extent of the law.

Last edited by SlyMaelstrom; 06-05-2006 at 04:53 PM.
SlyMaelstrom is offline   Reply With Quote
Old 06-05-2006, 04:53 PM   #11
Frequently Quite Prolix
 
dwks's Avatar
 
Join Date: Apr 2005
Location: Canada
Posts: 7,629
Sorry, I missed that (even though I quoted it).
__________________
dwk

Seek and ye shall find. quaere et invenies.

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell


Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net

My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, etc.

New project: nort
dwks is offline   Reply With Quote
Old 06-05-2006, 05:05 PM   #12
(?<!re)tired
 
Mario F.'s Avatar
 
Join Date: May 2006
Location: Portugal
Posts: 5,220
Quote:
Originally Posted by SlyMaelstrom
There may be standard code that won't compile in modern VS, but I haven't heard anything about it. I couldn't say I'm a reliable source on it.

Well... I didn't get a satisfactory answer yet to a thread started here a few days ago about uninitialized pointers to const under VC++ 2005. Info I get from books is that this is a compile-time error. However VC++ 2005 treats it as undefined and goes as far as not even issuing a warning.

But I'm threading lightly. I can't find an authoritative writing on it. Regardless this may as well be something in which VC++ 2005 doesn't follow the standards.
__________________
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.


Mario F. is offline   Reply With Quote
Old 06-05-2006, 06:14 PM   #13
Code Goddess
 
Prelude's Avatar
 
Join Date: Sep 2001
Posts: 9,661
>I am hoping it is possible to use the Visual Studio IDE with a different compiler.
Yes, you can. Hell, I do it with my favorite assembler (FASM), so you're not even restricted to a language directly supported by Visual Studio. Unfortunately, it's not exactly a simple process. You need to set up some custom build rules and otherwise customize the build process to use a different compiler.
__________________
My best code is written with the delete key.
Prelude is offline   Reply With Quote
Old 06-06-2006, 07:18 AM   #14
Registered User
 
Join Date: Jun 2006
Posts: 3
The code is not standard C++. The error I'm getting is on a line that uses "#include_next". I googled this and it looks like it's a special feature of g++, not standard C++.
tooKool4School6 is offline   Reply With Quote
Old 06-06-2006, 01:04 PM   #15
Super Moderator
 
Bubba's Avatar
 
Join Date: Aug 2001
Posts: 7,472
Prelude has it. Custom build rules. Will also compile shaders from within the IDE.
Bubba is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Studio 8 IDE: intellisense (?) says 'symbol undefined'? Jace Windows Programming 6 06-24-2009 02:46 AM
Crazy errors caused by class, never seen before.. Shamino C++ Programming 2 06-10-2007 11:54 AM
Templates and Macros plus more... Monkeymagic C++ Programming 8 01-20-2007 05:53 PM
using classes krazykrisi C++ Programming 9 11-22-2006 10:41 AM
Please Help - Problem with Compilers toonlover C++ Programming 5 07-23-2005 10:03 AM


All times are GMT -6. The time now is 08:48 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22