Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411491 Posts in 69377 Topics- by 58433 Members - Latest Member: graysonsolis

April 29, 2024, 09:42:55 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Which IDE? C++
Pages: 1 [2] 3
Print
Author Topic: Which IDE? C++  (Read 9169 times)
Aik
Level 6
*


View Profile
« Reply #20 on: January 15, 2010, 09:43:21 PM »

I like Code::Blocks, and don't see the fuss over Visual Studio (anyone care to enlighten? I've used it and didn't find anything exciting).

Don't use Dev-C++ - it's got very annoying broken bits.
Logged
Crimsontide
Level 5
*****


View Profile
« Reply #21 on: January 16, 2010, 12:07:22 AM »

I use Visual Studio Express 2008 for home projects and Visual Studio 2005 pro for work.  Visual Studio Express 2008 is not a trial version, its a full version of the IDE and optimizing compiler with most features you'd need for game development.  The big things it lacks are:

1) MFC\ATL support
2) 64-bit compiler
3) Resource editor
4) no support for add-ins or macros

There are free resource editors available (such as ResEdit) and technically it is possible to build 64-bit apps.  WxWidgets would be a good free alternative to MFC.

Quote from: Crimsontide
the optimizer leaves much to be desired.

I'm also curious about this as well.  Both the Pro and Express edition are supposed to ship with the same compiler.  Have you profiled the same code base built with Express and Pro with the same compiler options and found that the Express build was slower, or are you unhappy with Microsoft's compiler in general?

I mainly use the 64-bit compiler (one that comes with the Platform SDK).  And I'm just talking about the MS compiler in general.

Here's a few issues I have with it:

The 1st is there is no inline assembly.  Which sucks, and when querying about its absence MSDN will directs you to compiler intrinsics (to replace the lack of inline), but those are a complete mess.  They translate to horrendously slow code (using SSE intrinsics will almost guarantee you slower execution than just naive C/C++ implementations), they don't know of things like stack alignment (and hence can actually produce incorrect code from what I've read, never happened to me but then again, I didn't use intrinsics for very long...), the compiler almost always surrounds each intrinsic with 1/2 a dozen mov instructions (it can't seem to optimize around them).  On top of all of that many key intrinsics are just plain missing, with no explanation.  For example, I was implementing a 64-bit fixed point math type, and needed a long divide, which just doesn't exist.  I mean were not even talking some weird or obscure SSE 49.3b swizzle with packed negation and move bunnies instruction.  Its just divide.  So say you want to make a simple vector math library in MSVC... you can't use SSE.  You can't use inline assembly, intrinsics will generate slower code, and normal linked assembly will mean a function call each operation.  With something as simple as:

Code:
float4 a, b, c;
a = b + c;

you cannot (at least I wasn't able to) get it to compile to:

Code:
movaps xmm1, [b]
addps xmm1, [c]
movaps [a], xmm1

or some remote equivalent.  Now I never checked to see if the compiler would inline externally linked assembly, but I really, really doubt it.

The 2nd is kinda along the same issue, both GCC and the Intel compiler will attempt to 'vectorize' your code and make proper use of SSE instructions.  Neither are perfect (it is from what I understand an NP-Complete problem) but they do a decent job.  Again the MS compiler doesn't even try.

The 3rd issue is alignment.  I'm not sure if GCC or Intel get this right or not.  If I remember correctly (its late here...), the MS compiler can't handle returning aligned types.  So again, trying to use sse types, or any large type efficiently is quite difficult.

The 4th issue is compilation speed.  Again this may or may not just be MS specific.  Compilation can be split across multiple threads (yay!!) which makes good use of my quad core.  But in release mode, with global code gen on, most of the actual complilation (code gen) takes place in the linker stage.  Makes sense from a optimization point of view (hence the whole 'global optimization' settings), but linking is single threaded.  So in a large project, regardless of how many cores u have, ur pretty much still compling on a single core, and it takes FOREVER!!!!  Problem is, debug code is so slow (and understandably so) that often you can't even properly test in it.  It'd be really nice if they'd make code gen a bit more parallel-centric.

5th, and this is rare, but still annoying.  It just randomly breaks.  Given enough code you'll find some combination that causes the internal parser state to essentially walk off the end of its table, and it'll spit out some seemingly random error.  The fix is easy, but painful to find.  Quite often (at least 1-2 times in a big project) I got some obscure bug, that after 2-3 hours of painstaking debugging, find out my code is fine, and if I move a couple lines around, the compiler works fine.  Also, from time to time, it seems to like to randomly corrupt the .bsc file and/or intellisense file (not sure if either is truly compiler related, or where the actual IDE/compiler division lies) forcing you to delete and recompile (I like 15 min compile breaks, but not when I'm forced to take one).

Thats all I can really think of off the top of my head.  I really wish we could use the GCC compiler with visual studio, but I had no luck (if anyone has, or knows any sites about how to set it up, I'd love to know).  The Intel compiler is awesome (completely zero issue drop in replacement), but costs alot (beyond my indie budget, of 'whatever I can DL for free') and from what I hear now generates crippled code for AMD cpus.
Logged
zantifon
Level 0
**


View Profile WWW
« Reply #22 on: January 16, 2010, 12:35:56 AM »

The 4th issue is compilation speed.  Again this may or may not just be MS specific.  Compilation can be split across multiple threads (yay!!) which makes good use of my quad core.  But in release mode, with global code gen on, most of the actual complilation (code gen) takes place in the linker stage.  Makes sense from a optimization point of view (hence the whole 'global optimization' settings), but linking is single threaded.  So in a large project, regardless of how many cores u have, ur pretty much still compling on a single core, and it takes FOREVER!!!!  Problem is, debug code is so slow (and understandably so) that often you can't even properly test in it.  It'd be really nice if they'd make code gen a bit more parallel-centric.

You can of course just disable whole-program optimization to mitigate this, since then the linking step is usually no slower than debug mode. You still leave all other optimizations on, so while it doesn't produce quite as fast code, it's still orders of magnitude over debug mode. I usually only enable WPO for final release builds.
Logged
gnat
Level 1
*



View Profile WWW
« Reply #23 on: January 16, 2010, 03:34:28 AM »

Code::Blocks, no contest.

Don't get me wrong, I was a VERY heavy Dev-C++ user back in the day, completing a many game projects with it; so it sort of has a soft spot on me.

However this was back in 2005/2006 and the latest version of Code::Blocks (be sure to get a nightly build) will better serve you for the following reasons and more:

  • Much less buggier in comparison, Dev-C++ will crash occasionally. Code::Blocks is actively developed (Dev-C++ is a long dead project).
  • Visual debugger that works well. Dev-C++'s visual debugger doesn't always work. And you'll want a debugger if you intend on doing anything big (over 10k lines i'd say personally).
  • Can use the latest versions of MinGW, with GCC 4.x
  • For those who like devpaks, it has a devpack importer and can connect to Dev-C++'s devpak servers.

In reality, there's almost no reason to use Dev-C++ over Code::Blocks these days.

[edit]
Also, Microsoft's C++ Express Edition Compiler has no debugger as far as I know.
« Last Edit: January 16, 2010, 03:41:38 AM by gnat » Logged

LAN Party List - The definitive LAN party list. Also Game Jams, etc.
GitHub
Tycho Brahe
Level 10
*****

λx.x


View Profile
« Reply #24 on: January 16, 2010, 04:26:56 AM »

Code::Blocks, no contest.

Don't get me wrong, I was a VERY heavy Dev-C++ user back in the day, completing a many game projects with it; so it sort of has a soft spot on me.

However this was back in 2005/2006 and the latest version of Code::Blocks (be sure to get a nightly build) will better serve you for the following reasons and more:

  • Much less buggier in comparison, Dev-C++ will crash occasionally. Code::Blocks is actively developed (Dev-C++ is a long dead project).
  • Visual debugger that works well. Dev-C++'s visual debugger doesn't always work. And you'll want a debugger if you intend on doing anything big (over 10k lines i'd say personally).
  • Can use the latest versions of MinGW, with GCC 4.x
  • For those who like devpaks, it has a devpack importer and can connect to Dev-C++'s devpak servers.

In reality, there's almost no reason to use Dev-C++ over Code::Blocks these days.

[edit]
Also, Microsoft's C++ Express Edition Compiler has no debugger as far as I know.

I've uses the express edition more than c::b although I prefer the latter. However I'm pretty sure that vc++ does have a debugger, I *think* I've used it...
Logged
salade
Level 4
****



View Profile
« Reply #25 on: January 16, 2010, 05:58:50 AM »

Right now I'm using a combination of notepad++ and Mingw from the command line, although I am thinking of switching to code blocks, since I was using Dev.

I've gotten a free copy of the full Visual studio on my computer, but I'll be damned if I have the attention span to set up a project on it.
Logged
Chromanoid
Level 10
*****



View Profile
« Reply #26 on: January 16, 2010, 06:40:38 AM »

You should give Netbeans a try. http://netbeans.org/features/cpp/index.html
Netbeans is powerful flexible and good for multi-platform development.

some features: refactoring, code completion, automatic make file creation, support for different compilers, profiler...
« Last Edit: January 16, 2010, 07:33:47 AM by Chromanoid » Logged
Gold Cray
Level 10
*****


Gold Cray


View Profile WWW
« Reply #27 on: January 16, 2010, 09:16:44 AM »

Right now I'm using a combination of notepad++ and Mingw from the command line, although I am thinking of switching to code blocks, since I was using Dev.
I used notepad++ for a while, and it's a pretty decent text editor, but I was really using it as a replacement for gedit. Now it turns out that there's a gedit build for windows.
Logged
Klaim
Level 10
*****



View Profile WWW
« Reply #28 on: January 16, 2010, 06:28:46 PM »

Personally, I use a copy of the Pro version of Visual Studio 2008 + Visual Assist X. I've not paid for it and will not until I start selling what I did with it (I only paid for VAX, but that's to speed up my 1-man-team developement).

You have to know that it's "tolerated" from big companies like Microsoft, Adobe or even Autodeskt that you learn and use their tools, even illegal copies, until you start making money with it -- in any way.

So, if you don't plan to make anything that can be sold -- or are willing to pay once you've done what you'll sell -- then why limit yourself with half-baked tools? (but don't use the Team version, it's too much -- use the pro version and select only what you need at the moment in the installation choices)

Now that said, most of the time you SHOULD use free versions, it's just an advice for the case you really want the best tool for developing in C++ on windows, because a lot of very experienced people agree on one thing : Visual Studio + Visual Assist X just beat any other tool in this category.

Visual Studio 2010 will make a lot of Visual Assist X features obsolete so this one alone will beat any other IDE.

Code Blocks is good, in fact that would be my second choice over Visual Studio Express. But it's not as powerful as VS+VAX combo, in my experience. It's still "young".

Anyway that's just an advice.
Logged

Impossible
Level 3
***



View Profile
« Reply #29 on: January 16, 2010, 07:03:35 PM »

Nice write up Crimsontide.  I haven't used the 64 bit compiler so I wasn't aware of its limitations. The 32-bit compiler will definitely try to use SSE2 instructions to vectorize code.  This isn't always faster, but all you have to do is compile with /SSE2. I have managed to break the MS compiler on rare occasions, but it also happens with GCC.  I've used GCC with MSVC on multiple projects, but that has always been with mobile (BREW, Symbian) or console (PS3) SDKs that generate project and make files that work with MSVC.  It seems like it wouldn't be very difficult to use GCC and cygwin or mingw with visual studio, if you really want to do that.  In my experience GCC isn't vastly superior to the MS compiler in anyway, both have issues, not that either is horrible imo.


[edit]
Also, Microsoft's C++ Express Edition Compiler has no debugger as far as I know.

Sigh... I guess I am just imagining that I'm using a debugger with Visual Studio 2008 Express. It ships with the same debugger as Visual Studio 2008.
Logged
Crimsontide
Level 5
*****


View Profile
« Reply #30 on: January 17, 2010, 12:49:33 AM »

Nice write up Crimsontide.  I haven't used the 64 bit compiler so I wasn't aware of its limitations. The 32-bit compiler will definitely try to use SSE2 instructions to vectorize code.  This isn't always faster, but all you have to do is compile with /SSE2. I have managed to break the MS compiler on rare occasions, but it also happens with GCC.  I've used GCC with MSVC on multiple projects, but that has always been with mobile (BREW, Symbian) or console (PS3) SDKs that generate project and make files that work with MSVC.  It seems like it wouldn't be very difficult to use GCC and cygwin or mingw with visual studio, if you really want to do that.  In my experience GCC isn't vastly superior to the MS compiler in anyway, both have issues, not that either is horrible imo.


[edit]
Also, Microsoft's C++ Express Edition Compiler has no debugger as far as I know.

Sigh... I guess I am just imagining that I'm using a debugger with Visual Studio 2008 Express. It ships with the same debugger as Visual Studio 2008.

The /SSE2 command doesn't do quite what u think it does.  It does use (and emit) SSE code, but it won't vectorize ur code.  It merely treats the SSE registers as a few extra floating point regs, and will use nothing but scalar SSE ops.  So you do get better performance than without it, but no SIMD is actually happening.  GCC and Intel on the other hand will actually attempt (with varying success) to use actual SIMD code, ie. perform more than 1 add or multiply or what-not in a single instruction.

And ya, I'm sure ur right about GCC, really haven't had the chance to put it through its paces like I do the MS one.  For the short time I was able to use the intel one, it seemed to work great.  I guess I'd just rather work with GCC because I'm more partial to Open Source Wink  Or maybe its just my innate anti-MS showing through.  But I really expect alot more out of the largest software company in the world, using (what is supposed to be) one of the most used, and crucial, software tool.

But the Visual Studio debugger is sweet (and so easy to use), and if they could get intelli-stupid to work past a template or typedef, I'd be ecstatic.
Logged
object_0
Level 0
*



View Profile
« Reply #31 on: January 17, 2010, 12:51:03 AM »

Go with Visual Studio Express. When you're a beginner it's important that you choose a common IDE when searching for help on internet. Visual Studio is by far the most popular IDE on Windows. I would not care about the 64-bit compiler, if you feel the need in the future you can upgrade the Express edition to Standard or Professional edition.
Logged

it's your birthday.
Endurion
Level 2
**



View Profile WWW
« Reply #32 on: January 17, 2010, 04:36:28 AM »

If you're on Windows, Visual Studio Express blows everything out of the water. There are a few bits missing as mentioned (resource editor, no macros/addins) but everything else is there.
It works perfectly fine for most game related things.

Only a tad cumbersome, if you intend to use both C++ and C# you need to download and install two apps. They don't combine like a full Visual Studio version does.
Logged
Chromanoid
Level 10
*****



View Profile
« Reply #33 on: January 17, 2010, 04:50:20 AM »

Go with Visual Studio Express. When you're a beginner it's important that you choose a common IDE when searching for help on internet. Visual Studio is by far the most popular IDE on Windows. I would not care about the 64-bit compiler, if you feel the need in the future you can upgrade the Express edition to Standard or Professional edition.
http://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edition-and-64-bit-targets/
Logged
PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #34 on: January 17, 2010, 06:14:31 AM »

My $0.02, try eclipse:

http://www.eclipse.org/

Go Downloads -> Eclipse for C++

Eclipse is open source, really full featured and has a lot of plugins. I don't know how it compares to VS but I do know it's very capable. Since I develop mainly on linux this is the best choice for me, but I do also use the windows version for when I do my windows builds.
Logged
Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW
« Reply #35 on: January 17, 2010, 11:53:25 AM »

I think Code::Blocks is the least of all the evils as far as Windows dev environments go.  I your going to pay for one, see if Borland still makes them.  I always thought that Borland's stuff was way better than anything MS ever put out.
Logged



What would John Carmack do?
Impossible
Level 3
***



View Profile
« Reply #36 on: January 18, 2010, 09:55:16 AM »

The /SSE2 command doesn't do quite what u think it does.  It does use (and emit) SSE code, but it won't vectorize ur code.  It merely treats the SSE registers as a few extra floating point regs, and will use nothing but scalar SSE ops.  So you do get better performance than without it, but no SIMD is actually happening.  GCC and Intel on the other hand will actually attempt (with varying success) to use actual SIMD code, ie. perform more than 1 add or multiply or what-not in a single instruction.

Quick trivial test shows that you're right about SSE in MSVC. Kind of sucks, I always assumed it had some limited vectorization capabilities.

Quote
But I really expect alot more out of the largest software company in the world, using (what is supposed to be) one of the most used, and crucial, software tool.

I've heard rumors that they only have one guy maintaining the compiler back end for MSVC  Big Laff. Seems like most of their development tool resources go to .NET. Kind of funny because the opposite is true with Xbox.
Logged
Will Vale
Level 4
****



View Profile WWW
« Reply #37 on: January 18, 2010, 02:32:13 PM »

I mainly use the 64-bit compiler (one that comes with the Platform SDK).  And I'm just talking about the MS compiler in general.

Ah right, I thought you were comparing the Express Edition and paid-for VC compilers. Thanks for the summary of the problems, mucn appreciated - although I suspect most people on here won't be troubled by the lack of 64-bit inline assembly!

On the SSE front, I suspect if you want high performance code you probably want to be processing lots of data at once in a stream/SoA model rather than getting your vector class operator+ to be 4-wide Smiley

My 2p...

Will
Logged
iamwhosiam
Level 0
***


View Profile WWW
« Reply #38 on: January 18, 2010, 06:26:36 PM »

if your starting out DON'T EVER pay for an IDE.

also, you really open up a can of worms when you ask which IDE lol :D
Logged
oahda
Level 10
*****



View Profile
« Reply #39 on: January 19, 2010, 12:00:11 AM »

No, Microsoft's stuff will not do what you want.
Visual Studio and its compiler doesn't work with standard C++, and you will get crap, and also get laughed at.

If you're on Windows, I suggest programming in Code::Blocks. It had code completion and a lot of other features, such as creating little or large macros of your own. For example, I've made one to generate my header and source files' main structure as long as the files are named according to the classes and the project is correctly named, as well as the date of the creation of the file.

The IDE isn't the most important part, though. You might as well code in Notepad (but obviously, you shouldn't). The important part is the compiler, and on Windows you should use MinGW, which is a Windows adaption of the standard GNU C++ Compiler, which you would use on Linux or Mac. You can get it bundled with Code::Blocks from the Code::Blocks website.

I don't really like developing in Windows, though. I prefer programming on Linux (although as far as I know, you can use the real G++ on Mac as well, but I can't afford one at the moment). Some stuff is just a real pain on Windows at the moment, but I still always program portably, and you should too. Having to port later on is not enjoyable.
« Last Edit: January 19, 2010, 12:31:51 PM by Adam Skoog » Logged

Pages: 1 [2] 3
Print
Jump to:  

Theme orange-lt created by panic