Jump to content


What compiler do you use and why?


  • You cannot reply to this topic
15 replies to this topic

#1 justdan

    Member

  • Members
  • PipPip
  • 59 posts

Posted 13 June 2006 - 12:38 AM

I was just wondering if I should switch compilers as I'm using microsoft studios now for c++ but I've heard some bad things about it, yet not having any experience with other compilers I don't know what these bad things are. Anyone care to offer the compiler they're using as a substitute?

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 13 June 2006 - 02:09 AM

I've used Visual Studio (7.1; haven't made the leap to 8.0 yet) for several years of hobby development, and I've never had any major problems with it. The IDE is pretty nice; it's very convenient to have all the compiler options configurable using a series of dialog boxes, and the VS debugger is a very fine piece of work.

The main other C++ compiler (family) that you will run into sooner or later is gcc, aka mingw on Windows platforms. It's a command-line tool; there are IDEs available that wrap it, like DevC++ and Code::Blocks, though I haven't used the IDEs. If you wanted, you could use the Visual Studio IDE and compile with gcc, or use one of the free IDEs and compile with the Microsoft compiler. However you can't use the Visual Studio debugger with gcc; you'll have to use gdb or ddd for that (don't you just love all these TLAs? B))

Which set of software (Microsoft vs GNU) you decide to use is largely a matter of taste, past experience, finances, and political views; however, within my experience I'd point out the following differences between them:

* VS has a lot of "extensions" to C++ in its compiler that enable users to write not-quite-standards-compliant programs (for instance, the infamous for loop scope conformance issue, though newer versions of VS are better about this). On the other hand, gcc tends to be "fussier" (read: more adherent to the Standard) about these things, and often produces a variety of warnings that VS will not produce even on the highest warning level. Another thing gcc can be fussy about is templates.
* VS is generally better at optimization. As an anecdote, a raytracer I wrote once (heavy use of floating-point operations) rendered an image over 3 times faster when compiled with VS than when compiled with gcc, on the same machine.
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 jjd

    Member

  • Members
  • PipPip
  • 65 posts

Posted 13 June 2006 - 02:42 AM

Reedbeta said:

(don't you just love all these TLAs? ;))

Interestingly, TLA is not an acronym ;-)
hi, i'm a signature viruz, plz set me as your signature and help me spread :)

#4 justdan

    Member

  • Members
  • PipPip
  • 59 posts

Posted 13 June 2006 - 02:46 AM

I've tried visual studios 8 and didn't like it that much I'll have to try 7 though, using 6 now.

#5 SamuraiCrow

    Senior Member

  • Members
  • PipPipPipPip
  • 459 posts

Posted 13 June 2006 - 04:11 AM

I always use GCC since I don't want to be locked into just writing Windows software the rest of my natural born days.

#6 Almos

    Member

  • Members
  • PipPip
  • 99 posts

Posted 13 June 2006 - 07:03 AM

Same as SamuraiCrow.
I want to make a game as good as Elder Scrolls oblivion with no programming, just point&click. If it's not possible, I want a team of programmers I'd be able to order around. After all, I'm a n00b.

#7 Nick

    Senior Member

  • Members
  • PipPipPipPip
  • 1225 posts

Posted 13 June 2006 - 08:23 AM

Visual Studio 2005 for me. I haven't found anything yet that compares to it.

#8 moe

    Valued Member

  • Members
  • PipPipPip
  • 270 posts

Posted 13 June 2006 - 09:30 AM

I agree with Nick. And the Express Edition is free :)

#9 roel

    Senior Member

  • Members
  • PipPipPipPip
  • 697 posts

Posted 13 June 2006 - 11:03 AM

And I agree with moe and Nick :)

#10 tbp

    Valued Member

  • Members
  • PipPipPip
  • 135 posts

Posted 13 June 2006 - 12:25 PM

Reedbeta said:

* VS is generally better at optimization. As an anecdote, a raytracer I wrote once (heavy use of floating-point operations) rendered an image over 3 times faster when compiled with VS than when compiled with gcc, on the same machine.

I'll bite.

For my SSE raytracer, with both automatic scalar codegen & intrinsics paths, taking msvc8 as the baseline rendering is at least 25% faster with gcc (icc 9.1 is a couple of percent slower) on xp32; it's even worse for kd-tree construction which is more about memory/pointer manipulations than fp computations.
It's no surprise as msvc8 spits branches like there's no tomorrow, a no no for performance even on a k8.

And it didn't happen overnight, it has been that way for a couple of years (note that icc used to produce slightly faster 32bit code than gcc).

So, i'll dare to suggest you to revise your coding style.

Now there's no doubt msvc integrated visual debugger is unmatched - if a bit bloated -.

EDIT: note that it takes like 10 lines of perl to transmogrify gcc's warnings & errors into something that mscv IDE groks.

#11 Dias

    New Member

  • Members
  • PipPip
  • 24 posts

Posted 13 June 2006 - 01:17 PM

Nick said:

Visual Studio 2005 for me. I haven't found anything yet that compares to it.

Same here.

#12 Jare

    Valued Member

  • Members
  • PipPipPip
  • 247 posts

Posted 13 June 2006 - 07:04 PM

Reedbeta said:

VS has a lot of "extensions" to C++ in its compiler that enable users to write not-quite-standards-compliant programs (for instance, the infamous for loop scope conformance issue, though newer versions of VS are better about this). On the other hand, gcc tends to be "fussier" (read: more adherent to the Standard) about these things
Heh, I used to think the opposite... gcc has a metric ton of extensions (general and platform-specific); with C++/CLI, things are, heh, muddier. Gcc is quicker to include any additions and changes to the standard.

Visual Studio 2005 is a true gem of an IDE. I had a hard time swallowing the first .NET IDE, but it has evolved into an incredibly intuitive and powerful tool.

#13 kusma

    Valued Member

  • Members
  • PipPipPip
  • 163 posts

Posted 13 June 2006 - 08:46 PM

I use MSC, GCC or ARM RDS, all depending on the type of project I'm working on.

#14 SmokingRope

    Valued Member

  • Members
  • PipPipPip
  • 210 posts

Posted 13 June 2006 - 09:35 PM

Jare said:

Visual Studio 2005 is a true gem of an IDE.

Although 've had some issues with the form designer; Visual Studio's UI has been blindingly fast compared to Eclipse. I've yet to come to terms with vim or emacs making it just about the only way to develop.

#15 eddie

    Senior Member

  • Members
  • PipPipPipPip
  • 751 posts

Posted 13 June 2006 - 11:06 PM

Personally, I use Visual Studio as my IDE on windows, VIM is my all purpose IDE on other things.

I make Visual Studio pop up a GVIM app for files that Visual Studio doesn't handle so nicely however, which is quite handy. For instance, at work I use it to deal with UnrealScript code, which I get no real benefit out of using the VisualStudio IDE.

#16 Wernaeh

    Senior Member

  • Members
  • PipPipPipPip
  • 368 posts

Posted 14 June 2006 - 11:40 AM

Quote

Visual Studio 2005 for me. I haven't found anything yet that compares to it.

Dito.

Cheers,
- Wernaeh
Some call me mathematician, some just call me computer guy. Yet, I prefer the term professional weirdo :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users