Setting up GCC under XP Pro

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
I have the 4.4.0 package extracted, but can't find the path and environment settings to get it to work.

Anyone have a write up?
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,610
4,530
75
I hear doing the setup yourself is hard. If you want GCC4, would the TDM GCC builds (4.2.4 or 4.3.3) work for you?
 

Kirby

Lifer
Apr 10, 2006
12,028
2
0
I think if it was too much trouble, I'd just have a *nix VM and do it there. :)
 

Net

Golden Member
Aug 30, 2003
1,592
2
81
i use cygwin. its simple.

if your okay with coding through a terminal by using vi or pico then cygwin is a fast way to setup what you need.
 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
I will look at these tonight, I used to use cygwin...rebuilt my PC lately though and it's been 5-6 years since I installed any C environments.
 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
i am not going to be doing development on this machine...just need to compile things from time to time. Currently I just want feralbynight.cpp compiled for my Druid. :)

 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
I recommend Cygwin. You have to know what packages to install, but if you do, you should be able to get gcc running pretty easily. You can edit your files with vim or emacs (you can install an X server so you don't need to be constrained to a terminal).
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,610
4,530
75
The problem with Cygwin is that its compiled binaries require Cygwin1.dll, at least. MinGW, for which I gave a link for experimental GCC4 builds, produces more-or-less standalone binaries (for Windows).

If you're just trying to compile things, you shouldn't be going for GCC4 (unless you're looking for a faster binary). I'd suggest the official MinGW installer in general.
 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
Picked up that MiniGW...my .cpp is not compiling though. So then I tried downloading Quincy 2005 to make sure my syntax on the commandline is not messed up.

I am loading the cpp and doing 'compile' so not adding anything to the mix. I have it pointed to my lib and inc.

The header is:
#include <iostream>
#include <cmath>
#include <ctime>
#include "mtrand.h"

using namespace std;

I downloaded a mtrand.h but it's saying M_PI not declared in this scope.

It should be something obvious. Any ideas?



 

squatchman

Member
Apr 1, 2009
50
0
0
Well then your compilation environment doesn't know what cmath is.

Try changing #include <cmath> to #include "math.h"

 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
figured it out...Defined M_PI...I think there was also a checkbox in quincy that can do that...something about including C99 definitions.

I also had to include both the mingw\lib and the minqw32\lib in the options menu...

thanks

EDIT SPOKE TO SOON.

Compiled by can't build/make it exec.

Getting undefined reference to MTRand_int32::seed(unsigned long)
MTRand_int32::init
MTRand_int32::p
MTRand_int32::gen_state()
MTRand_int32::state