• Create Account

Banner advertising on our site currently available from just \$5!

# C++ Compilers & IDEs for Windows

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

41 replies to this topic

### #21Servant of the Lord  Crossbones+   -  Reputation: 21876

Like
0Likes
Like

Posted 11 March 2012 - 06:03 AM

I'm using QTCreator for both Windows and Linux. (Makes things easier when i don't have to swap IDE)

QtCreator is excellent.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames -

[Need web hosting? I personally like A Small Orange]

### #22e‍dd  Members   -  Reputation: 2105

Like
0Likes
Like

Posted 12 March 2012 - 05:33 PM

I don't think you should use GCC/MinGW on Windows unless you absolutely have to. MSVC should always be the default choice.

Why would this be? I ask because I would have said the same until 6 months ago. Obviously, a decision shouldn't be made based solely upon a single anecdote, but recent versions of GCC have been generating much faster code for me. The upcoming Visual C++ release might regain some ground, but I haven't tried any of the preview versions.

The general development environment in VS certainly has a lot more polish, but the decision perhaps isn't as clear cut as it was a couple of years ago (especially for people like me that don't use the IDE anyway).

### #23Ravyne  GDNet+   -  Reputation: 8947

Like
0Likes
Like

Posted 12 March 2012 - 05:49 PM

I don't think you should use GCC/MinGW on Windows unless you absolutely have to. MSVC should always be the default choice.

Why would this be? I ask because I would have said the same until 6 months ago. Obviously, a decision shouldn't be made based solely upon a single anecdote, but recent versions of GCC have been generating much faster code for me. The upcoming Visual C++ release might regain some ground, but I haven't tried any of the preview versions.

The general development environment in VS certainly has a lot more polish, but in the decision perhaps isn't as clear cut as it was a couple of years ago (especially for people like me that don't use the IDE anyway).

I would hazard a guess that the recent versions of GCC already support the new std::move semantics -- VS2010 does not, but the upcoming release certainly does. Move semantics will give you upwards of a 15% performance boost without doing anything at all if you're using STL in a significant way -- A little work is required to support your own types, but ought to end up producing much better code.

As for preferring MSVC in general, it's usually a hassle to use Windows' oriented libraries (say, DirectX) in GCC/MinGW, at least last time I gave it a go, but if GCC works for you, and you can put up with the slight inconveniences, it probably has the nice effect of removing a row from your platform support matrix, so do what's comfortable.

### #24e‍dd  Members   -  Reputation: 2105

Like
0Likes
Like

Posted 12 March 2012 - 06:26 PM

I would hazard a guess that the recent versions of GCC already support the new std::move semantics -- VS2010 does not, but the upcoming release certainly does. Move semantics will give you upwards of a 15% performance boost without doing anything at all if you're using STL in a significant way -- A little work is required to support your own types, but ought to end up producing much better code.

Actually, it seems to be auto-vectorization and global optimization that are providing the performance win. My anecdote comes from a software renderer that does no container, string, etc copying, sorting, etc after initial set-up.

As for preferring MSVC in general, it's usually a hassle to use Windows' oriented libraries (say, DirectX) in GCC/MinGW, at least last time I gave it a go, but if GCC works for you, and you can put up with the slight inconveniences, it probably has the nice effect of removing a row from your platform support matrix, so do what's comfortable.

Well, I use both, which is why I'm able to provide the observation. In general I certainly agree that Visual C++ is more convenient to get up and running, especially for a Windows-only project, but I just want to challenge the common notion (that I too held up until recently) that GCC generates slower code. Of course, this is just one project among many...

### #25Washu  Senior Moderators   -  Reputation: 6223

Like
0Likes
Like

Posted 12 March 2012 - 07:08 PM

I would hazard a guess that the recent versions of GCC already support the new std::move semantics -- VS2010 does not, but the upcoming release certainly does. Move semantics will give you upwards of a 15% performance boost without doing anything at all if you're using STL in a significant way -- A little work is required to support your own types, but ought to end up producing much better code.

Huh? VS2010 supports rvalue-references, std::move and std::forward.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
ScapeCode - Blog | SlimDX

### #26Ravyne  GDNet+   -  Reputation: 8947

Like
0Likes
Like

Posted 12 March 2012 - 07:46 PM

Drat, you're right Washu, my mistake. My confusion is probably an artifact of the "modern C++" push that's coming out now with fuller support for the new standard, r-value and move/forward being such a fundamental part of that.

### #27Bearhugger  Members   -  Reputation: 651

Like
0Likes
Like

Posted 14 March 2012 - 02:27 AM

I tend to jump between Visual Studio and Eclipse.

Visual Studio has the better debugger and has more tools to support Windows development. (Such as making .rc file with a visual editor.)

But for typing the code, I prefer Eclipse because of features like CTRL+Click to jump quickly from implementation to header, code refactoring, quick generation of stubs in the source file from the header file, easier to create templates for blank source files, the class viewer is integrated with the project explorer, integration with cppunit (VS has that but it only works for managed C++), etc. The only thing I like less in Eclipse is that its code sense has you push Enter to complete (instead of just pushing a delimiter such as ( . - > ;)). Java has that feature, why doesn't C++ have it? Also, I could be wrong but GCC appears to support way more C++11 features then VS.

Whew! I typed a lot more pros for Eclipse then Visual Studio. Visual Studio still gets the most love from me though. I only use Eclipse when I have ALOT of code to type and importing my VS project into Eclipse then back to VS is worth the trouble.

### #28SimonForsman  Crossbones+   -  Reputation: 6449

Like
0Likes
Like

Posted 14 March 2012 - 05:22 AM

I don't think you should use GCC/MinGW on Windows unless you absolutely have to. MSVC should always be the default choice.

There are quite a few advantages when you use gcc on windows though, you get PGO for free (for msvc you don't get it in the free version), you get far better C++11 support, command based editing is free with alot of IDEs (requires a commercial plugin for VS) and creating C++ GUI applications with VS is a pain in the ass.

There are drawbacks ofcourse aswell but saying that MSVC should always be the default choice is a bit extreme.

--this part is not part of the reply to Promit--
whats up with the massive downvoting of wqking, sure some of the posts were bad but the -2 on his first post is obviously just there to punish him for the later posts and has nothing to do with the quality of the post itself. (Punitive downvoting of unrelated posts is a bad idea imo as it makes it hard to use the little number next to the post to judge peoples overall opinion on the post itself)
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

### #29meeshoo  Members   -  Reputation: 508

Like
0Likes
Like

Posted 14 March 2012 - 06:26 AM

Visual Studio is king on their platform, mainly because of the IDE.

### #30L. Spiro  Crossbones+   -  Reputation: 15675

Like
1Likes
Like

Posted 14 March 2012 - 06:46 AM

I don't think it's a valid opinion.

Unfortunately, he is correct.
I just spent an entire week fixing over 1,000 compiler errors that were not present in Visual Studio while porting the code to Xcode, using either Apple LLVM or GCC 4.2.
And 99% of all of those fixes were made to templates, some of which had to be very heavily refactored, some simply eliminated.

Templates have the most varied of support between compilers in the entire language. No other feature of C++ will be so drastically different from one compiler to the next.
And many of the fixes I had to make were things that were perfectly allowed by the standard.
One was even a parser error on behalf of GCC.

template<class B, template<class A>> // Operator >> can’t be used here.
template<class B, template<class A> > // Oh I see that wasn’t the >> operator, my bad. Sorry my support for templates is a little off.

What was really annoying about that error was that it was code generated by Flex/Bison, so even if I fix it it will come back next time I update my language.
I had to make a script to replace those trouble lines inside the .bat/.sh file for generating the language parser.

Yes, templates are trouble on a lot of compilers, and this time it is not actually Microsoft’s fault, unless you are using something only they support, which is your own fault.

L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

### #31wqking  Members   -  Reputation: 756

Like
2Likes
Like

Posted 14 March 2012 - 07:09 AM

Unfortunately, he is correct.
I just spent an entire week fixing over 1,000 compiler errors that were not present in Visual Studio while porting the code to Xcode, using either Apple LLVM or GCC 4.2.
And 99% of all of those fixes were made to templates, some of which had to be very heavily refactored, some simply eliminated.

I had decided to not to answer questions in gdev since a lot of guys attacked me (via unreasonable down voting) a lot and my reputation dropped to 26 from 40in several days. But now it's 36? Don't know if any moderators did it.
But you are one of the best guys (or girl? not sure) here, so I would like to answer you.

All discussions I made in this thread is from my real world experience.
Indeed I've created a quite complicated (I can't say if it's same complicated as Boost, but it's really complicated, heavily template based) library and ported cross Windows (VC), Linux (GCC) and Mac (XCode). So I know how painful to port VC only code to gcc.

I don't want to complain about any unfair thing, but if anyone were aware of how my posts were rated you can see what ridiculous happens. Some misleading, no experience, guessing answers got up voted and my real experience answers got down voted again and again.

Thanks YogurtEmperor for you judgement.

http://www.cpgf.org/
cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.
v1.5.5 was released. Now supports tween and timeline for ease animation.

### #32SuperVGA  Members   -  Reputation: 1118

Like
0Likes
Like

Posted 14 March 2012 - 07:14 AM

template<class B, template<class A>> // Operator >> can’t be used here.
template<class B, template<class A> > // Oh I see that wasn’t the >> operator, my bad. Sorry my support for templates is a little off.

Well, it is good coding practice to have space between '<'s, '>'s and their contained identifiers when you don't stream or bit shift.
- I'm not sure the C++ standard mentions anything about the spacing, -and then would a compiler developer know what is the "right way"?

The compiler should always be able to determine the enclosing tags by counting them, naturally, if they are separate characters.
But if the operands have << overloaded, like std::string, it will likely assume that rather than bit shift or templates afaik.

### #33Bregma  Crossbones+   -  Reputation: 5659

Like
2Likes
Like

Posted 14 March 2012 - 07:53 AM

template<class B, template<class A>> // Operator >> can’t be used here.
template<class B, template<class A> > // Oh I see that wasn’t the >> operator, my bad. Sorry my support for templates is a little off.

Well, it is good coding practice to have space between '<'s, '>'s and their contained identifiers when you don't stream or bit shift.
- I'm not sure the C++ standard mentions anything about the spacing, -and then would a compiler developer know what is the "right way"?

The compiler should always be able to determine the enclosing tags by counting them, naturally, if they are separate characters.
But if the operands have << overloaded, like std::string, it will likely assume that rather than bit shift or templates afaik.

In the 1997 standard (C++03), >> is parsed as a right-shift operator. The standard required that. If you wanted nested templates, you absolutely had to put a space between the wedges. A compliant compiter MUST issue a diagnostic when it encounters that construct when run in C++98/C++03 mode.

The current standard (C++11) addresses this issue explicitly, requiring compilers to parse >> as two separate tokens when encountered in the context of a template declaration. A compliant compiler MUST NOT issue a diagnostic when it encounters that construct when run in C++11 mode.
Stephen M. Webb
Professional Free Software Developer

### #34wqking  Members   -  Reputation: 756

Like
1Likes
Like

Posted 14 March 2012 - 08:54 AM

I don't think you should use GCC/MinGW on Windows unless you absolutely have to. MSVC should always be the default choice.

There are quite a few advantages when you use gcc on windows though, you get PGO for free (for msvc you don't get it in the free version), you get far better C++11 support, command based editing is free with alot of IDEs (requires a commercial plugin for VS) and creating C++ GUI applications with VS is a pain in the ass.

There are drawbacks ofcourse aswell but saying that MSVC should always be the default choice is a bit extreme.

--this part is not part of the reply to Promit--
whats up with the massive downvoting of wqking, sure some of the posts were bad but the -2 on his first post is obviously just there to punish him for the later posts and has nothing to do with the quality of the post itself. (Punitive downvoting of unrelated posts is a bad idea imo as it makes it hard to use the little number next to the post to judge peoples overall opinion on the post itself)

Your this post got down voted.
Seems there are some nasty and despicable guys are attacking me, and also attacking anyone say good for me, for no reason.
I hope moderators can take actions on that.
And I won't participate in here as before.
gdnet is too large forum and mixed with too many different guys, good or bad, what ever.
I didn't discuss in stackoverflow because their voting system, but I didn't get any attacking like here!

http://www.cpgf.org/
cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.
v1.5.5 was released. Now supports tween and timeline for ease animation.

### #35Bearhugger  Members   -  Reputation: 651

Like
0Likes
Like

Posted 14 March 2012 - 01:19 PM

Don't worry, a couple years back, I also got massively downvoted and a mod even chastised me just for writing opinions against the trend. (Can't remember if it was here, Beginners' or Game Programming forums.) The thing is that programmers, especially on the hobbyist/open-source side, can be very passionate about which language, methodology or tools they prefer to use, so if you hurt a sacred cow, you'll get vivid opposition and bad karma. This isn't just GameDev or Stackoverflow, it's everywhere. I dunno why you're getting downvoted, but if it's for a similar reason as I did, I wouldn't lose sleep over it.

These forums are still a good source of information for game development even if you disagree with the opinions though.

### #36L. Spiro  Crossbones+   -  Reputation: 15675

Like
0Likes
Like

Posted 15 March 2012 - 11:12 AM

I had decided to not to answer questions in gdev since a lot of guys attacked me (via unreasonable down voting) a lot and my reputation dropped to 26 from 40in several days.

I voted your posts back up because there was never any reason for them to have been voted down, and especially because after being voted down you kept your cool in this topic and never lashed out.
Plus the fact that you, like I, were simply speaking from experience, and even if I made a mistake about what the standard says, no one voted me down, because it was clear I was obviously trying to help.

When I voted you back up you reached 36 as you noticed (and I can confirm). Now you are at 0. Obviously this is some bullshit.

I am not a moderator but I do feel that in this section of the forums all moderators are aware of me and hold a range of respect for me from neutral to positive something, meaning no one disrespects me.

You will have my witness should any moderators investigate this further, and I suggest that they do.

L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

### #37Washu  Senior Moderators   -  Reputation: 6223

Like
0Likes
Like

Posted 15 March 2012 - 12:01 PM

This is not a thread about ratings. Also: DoctorGlow, you seem to have an opinion about IDEs, why don't you sound in on the topic?

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
ScapeCode - Blog | SlimDX

### #38jbadams  Senior Staff   -  Reputation: 20224

Like
0Likes
Like

Posted 15 March 2012 - 05:58 PM

Seems there are some nasty and despicable guys are attacking me, and also attacking anyone say good for me, for no reason.
I hope moderators can take actions on that.
And I won't participate in here as before.

I'm going to investigate for you, as it does seem you may have received at least some down-votes unfairly -- we do look into these things if it appears you might have a real issue rather than just a couple of stray down-votes, but you should contact a moderator or member of staff outside of the topic rather than taking it off-topic in future.

Please don't let a small negative experience prevent you from participating here -- we do have a lot of friendly and helpful members as well!

That being said, Washu is correct that this topic is not about reputation scores, so we'll thank everyone to stay on topic from this point onwards -- if you would like to discuss the matter further feel free to contact me via private message or make a post in the Comments, Suggestions & Ideas forum.

### #39L. Spiro  Crossbones+   -  Reputation: 15675

Like
0Likes
Like

Posted 15 March 2012 - 07:36 PM

template<class B, template<class A>> // Operator >> can’t be used here.
template<class B, template<class A> > // Oh I see that wasn’t the >> operator, my bad. Sorry my support for templates is a little off.

Well, it is good coding practice to have space between '<'s, '>'s and their contained identifiers when you don't stream or bit shift.
- I'm not sure the C++ standard mentions anything about the spacing, -and then would a compiler developer know what is the "right way"?

The compiler should always be able to determine the enclosing tags by counting them, naturally, if they are separate characters.
But if the operands have << overloaded, like std::string, it will likely assume that rather than bit shift or templates afaik.

As mentioned, it was code generated by Flex or Bison, which is a cross-platform generator that is widely used on all platforms, so for it to generate code that cannot compile on the next most major compiler after Microsoft® Visual Studio® is a little suspect.

Whether or not the blame for >> falls on the standard rather than on GCC:
#1: Perfectly valid template code caused an internal error in GCC 4.2. I don’t remember the exact error phrase but at the time I checked Google and found it to be a known bug introduced in version 4.0.
#2: So switching over to Apple LLVM. A template had a static variable which was initialized in a different translation unit (from the translation unit of a class that inherited from that template).
template<class A, class B> SugarMcCool {
protected :
static B m_bGlobal;    // Or whatever.
};

class McAwesome : public SugarMcCool<int, float> {
};

McAwesome.cpp:
template<class A, class B> B m_bGlobal = 0.0f;
GCC 4.2 required this format in order to link properly.
Apple LLVM insisted this was an error, forcing me to change it to:
template<> B m_bGlobal = 0.0f;
However this produced a linker error, just as it did with GCC 4.2.

With GCC 4.2 having internal errors and Apple LLVM forcing us to pick a poison, the project was completely incapable of being compiled until the author eliminated that template altogether.

#3: Another set of perfectly valid template code was related to typedefs inside one of the templates. The compiler output showed it was expanding the template correctly, but insisted that the result of that typedef was typeless, when it very obviously was not. Use of the typedef was fine inside the original template, but from another translation unit suddenly it becomes typeless. I don’t think any standard allows for that. 3 hours and 4 sets of eyes later I finally discovered the cure.

L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

### #40davepermen  Members   -  Reputation: 1027

Like
0Likes
Like

Posted 15 March 2012 - 11:11 PM

For those who down voting me, please jump out to give your reason.
Down voting others anonymously with no reason is not something a man should do.
Thanks

I think the main issue is, it's similar to ie. ie6 was terrible in terms of standards (and predated most of them). so was vs6. since then, they worked more and more towards standards compliant applications, with ie10 implementing lots of html5 standards, and vs11 having tons of c++0x(orwhateverit'snameis) standards in there.

nowadays, the language/standard differences are mostly of academic nature. at least, compared to what they where.

and thanks to that (for the original topic) i can stay with visual studio no matter what i want to do. not that i care personally about crossplatform, but knowing that the hazzles are much less than they where is always a good thing.
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS