visual studio IDE w/ different compiler

This is a discussion on visual studio IDE w/ different compiler within the C++ Programming forums, part of the General Programming Boards category; I am hoping it is possible to use the Visual Studio IDE with a different compiler. I would like to ...

  1. #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.

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,074
    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.
    Sent from my iPad®

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,510
    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?
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    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.

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    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, nort, etc.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,510
    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.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    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.

  6. #6
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,074
    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.
    Sent from my iPad®

  7. #7
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    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, nort, etc.

  8. #8
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,510
    err... that's not standard c++
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    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.

  9. #9
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    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, nort, etc.

  10. #10
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,074
    ...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.
    Last edited by SlyMaelstrom; 06-05-2006 at 04:53 PM.
    Sent from my iPad®

  11. #11
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    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, nort, etc.

  12. #12
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,510
    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.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    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.

  13. #13
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >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.

  14. #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++.

  15. #15
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Prelude has it. Custom build rules. Will also compile shaders from within the IDE.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 06-24-2009, 02:46 AM
  2. Crazy errors caused by class, never seen before..
    By Shamino in forum C++ Programming
    Replies: 2
    Last Post: 06-10-2007, 11:54 AM
  3. Templates and Macros plus more...
    By Monkeymagic in forum C++ Programming
    Replies: 8
    Last Post: 01-20-2007, 04:53 PM
  4. using classes
    By krazykrisi in forum C++ Programming
    Replies: 9
    Last Post: 11-22-2006, 09:41 AM
  5. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM

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