Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411515 Posts in 69376 Topics- by 58431 Members - Latest Member: Bohdan_Zoshchenko

April 27, 2024, 04:39:26 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Help changing c++ compiler on windows
Pages: [1]
Print
Author Topic: Help changing c++ compiler on windows  (Read 2218 times)
Tycho Brahe
Level 10
*****

λx.x


View Profile
« on: December 28, 2009, 01:57:23 PM »

I'm looking to change compiler. I've become addicted to c++ and the ridiculus level of control it gives me over what my programme does (or so it seems to me compared to other languages). However I've be become disheartened with my current compiler, visual c++ 2008 and I'm looking for a change. I've heard good things about both code::blocks and g++/gcc, but quality documentation, guides and information on setting up the enviroment and compiling code seems to be somewhat lacking.

At the moment I'm moving towards the code::blocks enviroment, as it looks eaiser to install and work with.

I've got some questions however:

1) When installing code::blocks, what options do I have about installing conpilers, or do I have to do this at a later date.

2) Are the headers and libraries included with visual c++ (such as math.h, winsock2.h and wins32.lib) also included in the installation or are theese included with conpilers which I install at a later date. Or, do I have to find them and install them myself.

3) Is using external libraries and classes (such as box2d) just a matter of including their location in the list of locations to search for libraries and header files, or do I have to import them in some other way 

That's all really, as you can tell I'm a total noob with theese matters but I've become really disenheartened with vc++ and I need a change.

 If you have any advice on getting started with code::blocks, g++ or any other compilers it would be much apreciated, or, even better, answers to my questions.

Thanks!
Logged
Alex Vostrov
Level 3
***


View Profile WWW
« Reply #1 on: December 28, 2009, 02:07:43 PM »

I've switched to code:blocks and g++ a while ago because I hate Microsoft's DLL system.  In truth, VS is a superior IDE is every way, but I'm willing to suffer so that my audience doesn't have to.  Besides, it makes porting to Mac easier.

Here are some answers for you:

1) If I recall, code::blocks has two types of installations.  One with MinGW included, and one without.  Read this for more info: http://wiki.codeblocks.org/index.php?title=Mingw

2) MinGW (that's the windows version of gcc) should have all the c++ standard libraries and windows headers with it.

3) This depends on the library.  Box2d is something you can build manually, so it's fine.  I think that I had to re-build other things myself.


Why are you switching, I'm curious?  VS is really the best windows IDE around.  If I could use the 2005 version standard library, I'd switch back in an instant.  Unfortunately, the only way to do that is crazy voodoo with the driver dvelopment kit.
Logged
Alex Vostrov
Level 3
***


View Profile WWW
« Reply #2 on: December 28, 2009, 02:08:42 PM »

By the way, VS allows you to use other compilers in it.  I'm not sure how good the integration is, but you may not need code::blocks.
Logged
Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #3 on: December 28, 2009, 02:20:36 PM »

You'll have to recompile your external libraries with MinGW or find binaries for it.
Logged

Tycho Brahe
Level 10
*****

λx.x


View Profile
« Reply #4 on: December 28, 2009, 02:35:57 PM »

first of all, thanks for your replies, particularly about MinGW being the gcc windows version and having to recompile libraries, which i wasn't aware of.

I've generally got frustrated with vs, for example it's ways of handling libraries and the editor itself. Plus, i'd quite like a more portable compiler, in terms of mobility, not platforms, as I'd like to easily use a portable version of any compiler.

I'm not going to completely stop using vs, for example i'm going to continue projects I've started in vs invs, but I just want to have a more portable way to develop.
Logged
LemonScented
Level 7
**



View Profile
« Reply #5 on: December 28, 2009, 04:10:28 PM »

I've used a few different compilers and IDEs, and frankly Visual Studio beats all of them hands-down in pretty much every department. Each to their own though, I guess.

I hope you find another compiler you like, but if you don't, you might consider going back to Visual Studio and getting a copy of Visual Assist (http://www.wholetomato.com/). It's got lots and lots of really cool features which, to be honest, VS should already have built in but doesn't. Auto-complete, spellchecking, syntax colouring, lots of nice keyboard shortcuts for navigating around files more quickly. It's worth having a go with the trial version, because I know a couple of coders who hate it (they tend to be the types who think C++ is too new-fangled, and wished they were still coding straight C in Notepad with a DOS command-line compiler), but for me and most of the coders I know it's a minor miracle of software. It won't fix your annoyances with libraries, but it makes the environment a lot nicer to work in.
Logged

Alex Vostrov
Level 3
***


View Profile WWW
« Reply #6 on: December 28, 2009, 05:31:28 PM »

If you're dead-set against VS, you should consider CodeLite (there's also Eclipse CDT and Netbeans).  Code::Blocks is a bit weak on code completion.  I'm actually considering switching to CodeLite.  I can keep the MinGW backend and enjoy better CC.
Logged
Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW
« Reply #7 on: December 28, 2009, 05:45:42 PM »

I think Code::Blocks is the least of all the evils as far as Windows IDEs go.  I personally can't stand Visual Studio, and Dev-C++ seems to be no longer maintained.  Xcode is the best IDE around, as far as I'm concerned, but it's Mac only.

The biggest drawback to mingw is that the stable version is still GCC 3.4.x, as far as I know.  I believe you can use the GCC 4.x line, and one of these days I intend to try, but I don't know how stable it is.

I also believe that the mingw that ships with Code::Blocks is missing some of the newer win32 features, so if you want to use any win32 stuff from about Vista forward (the "Office ribbon" for example), you might need to look into something else.
Logged



What would John Carmack do?
increpare
Guest
« Reply #8 on: December 28, 2009, 05:59:49 PM »

I've used upgraded versions of GCC in windows, and found them pretty much fine.  For bigger things you might want to go for cygwin, but that's a rather bigger deal than installing codeblocks/mingw.
Logged
Tycho Brahe
Level 10
*****

λx.x


View Profile
« Reply #9 on: December 29, 2009, 02:52:51 AM »

Thanks for all your advice, also the tips about visual assist.
Like I said, I'm not looking to cut all ties with vs entirely but I am looking for a way to be able to work on projects on the move. Thanks!
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic