QtCreator is excellent.I'm using QTCreator for both Windows and Linux. (Makes things easier when i don't have to swap IDE)
C++ Compilers & IDEs for Windows
#21 Marketplace Seller - Reputation: 8923
Posted 11 March 2012 - 06:03 AM
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 - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal
#22 Members - Reputation: 2041
Posted 12 March 2012 - 05:33 PM
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.I don't think you should use GCC/MinGW on Windows unless you absolutely have to. MSVC should always be the default choice.
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).
#23 Members - Reputation: 2747
Posted 12 March 2012 - 05:49 PM
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.
I don't think you should use GCC/MinGW on Windows unless you absolutely have to. MSVC should always be the default choice.
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.
#24 Members - Reputation: 2041
Posted 12 March 2012 - 06:26 PM
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.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.
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...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.
#25 Senior Moderators - Reputation: 3113
Posted 12 March 2012 - 07:08 PM
Huh? VS2010 supports rvalue-references, std::move and std::forward.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.
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
#27 Members - Reputation: 257
Posted 14 March 2012 - 02:27 AM
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.
#28 Members - Reputation: 3678
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)
The voices in my head may not be real, but they have some good ideas!
#30 Crossbones+ - Reputation: 5144
Posted 14 March 2012 - 06:46 AM
Unfortunately, he is correct.I don't think it's a valid opinion.
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
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
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums
#31 Members - Reputation: 681
Posted 14 March 2012 - 07:09 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. But now it's 36? Don't know if any moderators did it.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.
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.
#32 Members - Reputation: 839
Posted 14 March 2012 - 07:14 AM
Well, it is good coding practice to have space between '<'s, '>'s and their contained identifiers when you don't stream or bit shift.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.
- 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.
#33 Members - Reputation: 2760
Posted 14 March 2012 - 07:53 AM
Yes, the standard has a lot to say about this.Well, it is good coding practice to have space between '<'s, '>'s and their contained identifiers when you don't stream or bit shift.
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.
- 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.
Professional Free Software Developer
#34 Members - Reputation: 681
Posted 14 March 2012 - 08:54 AM
Your this post got down voted.
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)
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.
#35 Members - Reputation: 257
Posted 14 March 2012 - 01:19 PM
These forums are still a good source of information for game development even if you disagree with the opinions though.
#36 Crossbones+ - Reputation: 5144
Posted 15 March 2012 - 11:12 AM
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.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.
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
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
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums
#37 Senior Moderators - Reputation: 3113
Posted 15 March 2012 - 12:01 PM
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
#38 Staff - Reputation: 8892
Posted 15 March 2012 - 05:58 PM
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.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.
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.
- Jason Astle-Adams.
From my blog: 20 ways to advertise your game | What next? Intermediate to advanced C++
How to make games WITHOUT programming | 4 reasons you aren't a successful indie developer
#39 Crossbones+ - Reputation: 5144
Posted 15 March 2012 - 07:36 PM
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.Well, it is good coding practice to have space between '<'s, '>'s and their contained identifiers when you don't stream or bit shift.
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.
- 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.
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.
Compiler error or linker error. Pick your poison.
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
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
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums
#40 Members - Reputation: 817
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.
My Page davepermen.net | My Music on Bandcamp and on Soundcloud






