• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Cacks

C++ Compilers & IDEs for Windows

41 posts in this topic

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.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
[quote name='Promit' timestamp='1331413251' post='4920969']
I don't think you should use GCC/MinGW on Windows unless you absolutely have to. MSVC should always be the default choice.
[/quote]

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 [b]always[/b] 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)
0

Share this post


Link to post
Share on other sites
[quote name='mhagain' timestamp='1331403038' post='4920937']
I don't think it's a valid opinion. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
[/quote]
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
1

Share this post


Link to post
Share on other sites
[quote name='YogurtEmperor' timestamp='1331729197' post='4921945']
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.
[/quote]
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.
2

Share this post


Link to post
Share on other sites
[quote name='YogurtEmperor' timestamp='1331729197' post='4921945']
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.
[/quote]
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.
0

Share this post


Link to post
Share on other sites
[quote name='SuperVGA' timestamp='1331730897' post='4921952']
[quote name='YogurtEmperor' timestamp='1331729197' post='4921945']
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.
[/quote]
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.
[/quote]
Yes, the standard has a lot to say about this.

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.
2

Share this post


Link to post
Share on other sites
[quote name='SimonForsman' timestamp='1331724176' post='4921933']
[quote name='Promit' timestamp='1331413251' post='4920969']
I don't think you should use GCC/MinGW on Windows unless you absolutely have to. MSVC should always be the default choice.
[/quote]

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 [b]always[/b] 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)
[/quote]
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!
1

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
[quote name='wqking' timestamp='1331730544' post='4921951']
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.
[/quote]
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
0

Share this post


Link to post
Share on other sites
This is not a thread about ratings. Also: [url="http://www.gamedev.net/user/164172-doctorglow/"]DoctorGlow[/url], you seem to have an opinion about IDEs, why don't you sound in on the topic?
0

Share this post


Link to post
Share on other sites
[quote name='wqking' timestamp='1331736880' post='4921983']
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.
[/quote]
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 [b]stay on topic from this point onwards[/b] -- if you would like to discuss the matter further feel free to contact me via private message or make a post in the [url="http://www.gamedev.net/forum/4-gdnet-comments-suggestions-and-ideas/"]Comments, Suggestions & Ideas[/url] forum.
0

Share this post


Link to post
Share on other sites
[quote name='SuperVGA' timestamp='1331730897' post='4921952']
[quote name='YogurtEmperor' timestamp='1331729197' post='4921945']
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.
[/quote]
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.
[/quote]
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).[CODE]
template<class A, class B> SugarMcCool {
protected :
static B m_bGlobal; // Or whatever.
};

class McAwesome : public SugarMcCool<int, float> {
};[/CODE]

McAwesome.cpp:
[CODE]template<class A, class B> B m_bGlobal = 0.0f;[/CODE]
GCC 4.2 required this format in order to link properly.
Apple LLVM insisted this was an error, forcing me to change it to:
[CODE]template<> B m_bGlobal = 0.0f;[/CODE]
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
0

Share this post


Link to post
Share on other sites
[quote name='wqking' timestamp='1331458088' post='4921078']
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
[/quote]

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.
0

Share this post


Link to post
Share on other sites
[quote name='YogurtEmperor' timestamp='1331861809' post='4922449'] [quote name='SuperVGA' timestamp='1331730897' post='4921952'] [quote name='YogurtEmperor' timestamp='1331729197' post='4921945'] template> // Operator >> can’t be used here. template > // Oh I see that wasn’t the >> operator, my bad. Sorry my support for templates is a little off. [/quote] 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. [/quote] 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.[/quote]
Sure, but Is it the compilation or the generation which is suspicious?

[quote name='YogurtEmperor' timestamp='1331861809' post='4922449']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).
...
Compiler error or linker error. Pick your poison.[/quote]
I'm not saying that your generated code isn't valid, only that it's unclear to developers of both code-generating compilers and binaries what is actually valid, more so what is [u]correct[/u]. So I'm not picking anything; only saying that if no party has a good definition on what is correct, and/or how the other parts will respond to or generate certain syntax, it does get difficult.
And if for instance the standard has no clear definition saying "> >"closes a two nested template types, >> doesn't", it's just difficult to reasonably point your finger to either party.

But I do understand your frustration with templates and tedious refactoring.
There's only a few things more annoying than doing something right, and then have your trusted compiler tell you that it ain't.
0

Share this post


Link to post
Share on other sites
The generating of cross-platform code that does not work on the most widely used cross-platform compiler is suspect.


L. Spiro
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0