Compile walkthrough?
by Todd McCullough · in Torque Game Engine · 10/20/2003 (11:24 am) · 17 replies
I've now got a few compilers. msys/mingw and dev c++ but I'm a little stuck. I can't get Dev to compile the test app without errors and I don't even know where to start with the command window of mingw.
Can one of you help me out? A artist (coding newb) that really wants to get in on this engine, but is stuck at the first hurdle (obviously the easiest for most of you)
I've searched the forums and I can't find any help for real newbs.
Can one of you help me out? A artist (coding newb) that really wants to get in on this engine, but is stuck at the first hurdle (obviously the easiest for most of you)
I've searched the forums and I can't find any help for real newbs.
About the author
#2
10/20/2003 (11:57 am)
Thanks Ron. I'm making some headway, and your post tells me I'm on the right track. I'll try it. Cheers!
#3
10/20/2003 (12:02 pm)
Damn coding is some real picky shit isn't it?!! If you could help me out some more, what exactly happens when it runs through the stuff. Should I look for an exe somewhere?
#4
10/20/2003 (12:17 pm)
Ok. I get errors when making. sometimes it gets further in the process then at others. What am I doing wrong? Or how can I get it to work?
#5
--> Compiling lpng/png.c
--> Compiling lpng/pngerror.c
--> Compiling lpng/pnggccrd.c
--> Compiling lpng/pngget.c
--> Compiling lpng/pngmem.c
--> Compiling lpng/pngpread.c
--> Compiling lpng/pngread.c
--> Compiling lpng/pngrio.c
--> Compiling lpng/pngrtran.c
--> Compiling lpng/pngrutil.c
--> Compiling lpng/pngset.c
--> Compiling lpng/pngtrans.c
--> Compiling lpng/pngvcrd.c
--> Compiling lpng/pngwio.c
--> Compiling lpng/pngwrite.c
--> Compiling lpng/pngwtran.c
--> Compiling lpng/pngwutil.c
lpng/pngwutil.c: In function 'png_write_chunk':
lpng/pngwutil.c:68: 'png_wr' undeclared (first use in this function)
lpng/pngwutil.c:68: (Each undeclared identifier is reported only once
lpng/pngwutil.c:68: for each function it appears in.)
lpng/pngwutil.c:68: parse error before ')' token
make[1]: *** [out.GCC3.DEBUG/lpng/pngwutil.obj] Error 1
make: *** [default] Error 2
10/20/2003 (12:20 pm)
Example--> Compiling lpng/png.c
--> Compiling lpng/pngerror.c
--> Compiling lpng/pnggccrd.c
--> Compiling lpng/pngget.c
--> Compiling lpng/pngmem.c
--> Compiling lpng/pngpread.c
--> Compiling lpng/pngread.c
--> Compiling lpng/pngrio.c
--> Compiling lpng/pngrtran.c
--> Compiling lpng/pngrutil.c
--> Compiling lpng/pngset.c
--> Compiling lpng/pngtrans.c
--> Compiling lpng/pngvcrd.c
--> Compiling lpng/pngwio.c
--> Compiling lpng/pngwrite.c
--> Compiling lpng/pngwtran.c
--> Compiling lpng/pngwutil.c
lpng/pngwutil.c: In function 'png_write_chunk':
lpng/pngwutil.c:68: 'png_wr' undeclared (first use in this function)
lpng/pngwutil.c:68: (Each undeclared identifier is reported only once
lpng/pngwutil.c:68: for each function it appears in.)
lpng/pngwutil.c:68: parse error before ')' token
make[1]: *** [out.GCC3.DEBUG/lpng/pngwutil.obj] Error 1
make: *** [default] Error 2
#6
10/20/2003 (2:01 pm)
Thanks Ron. Got it working, ran into a few errors while compiling and just continued to make it 'make'. Hope this is right.
#7
Torque and MinGW
Posted 104 days ago on July 7, 2003
I. the components
* Torque Release_1_1_2 +
* MinGW-2.0.0-3 +
* MSYS-1.0.9-2003.06.30-1 +
II. prep work
1. Download Torque from CVS into a directory (say e:torque). Worth checking you've done this correctly before we go any further. Inside your torque directory you have around 12 folders (bin, CVS, cw, doc etc.). All okay? Cool, onwards we go...
1. Download and install MinGW (say to e:MinGW).
1. Download and install MSYS (Say to e:MSYS1.0)
1. Edit the file /etc/fstab (in your msys install directory) and add a line to mount your torque directory within the MSYS simulated UNIX environment. Example fstab follows:
e:/MinGW /mingw
e:/torque /torque
IV. building torque
1. Double click the MSYS icon that appears on your desktop to open a UNIX 'like' console within windows.
From within an MSYS:
cd /torque
make -f mk/configure.mk OS=WIN32 COMPILER=GCC3 BUILD=DEBUG
make
When finished the demo will be in the example folder in your torque directory :D
Hope this helps.
10/22/2003 (8:54 am)
I found this on another website and had no problems compiling HEAD with the latest MSYS and MINGW.Torque and MinGW
Posted 104 days ago on July 7, 2003
I. the components
* Torque Release_1_1_2 +
* MinGW-2.0.0-3 +
* MSYS-1.0.9-2003.06.30-1 +
II. prep work
1. Download Torque from CVS into a directory (say e:torque). Worth checking you've done this correctly before we go any further. Inside your torque directory you have around 12 folders (bin, CVS, cw, doc etc.). All okay? Cool, onwards we go...
1. Download and install MinGW (say to e:MinGW).
1. Download and install MSYS (Say to e:MSYS1.0)
1. Edit the file /etc/fstab (in your msys install directory) and add a line to mount your torque directory within the MSYS simulated UNIX environment. Example fstab follows:
e:/MinGW /mingw
e:/torque /torque
IV. building torque
1. Double click the MSYS icon that appears on your desktop to open a UNIX 'like' console within windows.
From within an MSYS:
cd /torque
make -f mk/configure.mk OS=WIN32 COMPILER=GCC3 BUILD=DEBUG
make
When finished the demo will be in the example folder in your torque directory :D
Hope this helps.
#8
1. what is an fstab file? I have fstab.example file in there but not a lone fstab. Is this just a text file without an extension?
2. currently when I run msys, it immediately boots up mingw. Is this okay? Currently I have compiled an executable, but not without it first going through several errors, then me having to enter make again, and again...
10/22/2003 (5:36 pm)
Thanks Shay. Couple of questions;1. what is an fstab file? I have fstab.example file in there but not a lone fstab. Is this just a text file without an extension?
2. currently when I run msys, it immediately boots up mingw. Is this okay? Currently I have compiled an executable, but not without it first going through several errors, then me having to enter make again, and again...
#9
Yes the fstab file you are looking for doesn't have an extension, it can be opened in wordpad though just fine
it actually says mingw in the title but from what i can tell it is kinda like a fake linux environment just for mingw, so yes that is normal that it says that in the title bar.
for extra precautions i added mingw and msys into my system path, i don't know if that helps or hurts, but its there.
the way i go through it is, fire up msys and it gives me the command prompt
then
cd /torque
make -f mk/configure.mk OS=WIN32 COMPILIER=GCC3 BUILD=DEBUG
that sets up the conf.mk file for your system, then
make
that should compile with the current config, it went without a single error on my computer.
obviously you should use gcc2 or gcc3 depending on which version you are running, mine was 3 and it is the current version so if you downloaded the most recent versions do 3
10/22/2003 (6:07 pm)
Does the exe run fine?Yes the fstab file you are looking for doesn't have an extension, it can be opened in wordpad though just fine
it actually says mingw in the title but from what i can tell it is kinda like a fake linux environment just for mingw, so yes that is normal that it says that in the title bar.
for extra precautions i added mingw and msys into my system path, i don't know if that helps or hurts, but its there.
the way i go through it is, fire up msys and it gives me the command prompt
then
cd /torque
make -f mk/configure.mk OS=WIN32 COMPILIER=GCC3 BUILD=DEBUG
that sets up the conf.mk file for your system, then
make
that should compile with the current config, it went without a single error on my computer.
obviously you should use gcc2 or gcc3 depending on which version you are running, mine was 3 and it is the current version so if you downloaded the most recent versions do 3
#10
Cheers!
10/23/2003 (8:39 am)
Okay. Cool I think I'll uninstall mingw and try from msys alone. Also I'll take a stab (no pun intended) at fstab and make the changes you suggest.Cheers!
#11
MSYS is just a *nix shell for winblows, it will not give you the compiler ability. You will still need to have minGW (the compiler) installed.
-Ron
10/23/2003 (8:51 am)
@ToddMSYS is just a *nix shell for winblows, it will not give you the compiler ability. You will still need to have minGW (the compiler) installed.
-Ron
#12
10/23/2003 (2:05 pm)
Okey dokey. thanks Ron.
#13
with this in it
c:/Code/msys/1.0/mingw
c:/torque /torque
IV. building torque
but my torque directory is c:/torque , should it be entered like that? What other lines need to be added to it?
10/23/2003 (2:15 pm)
Okay fstab file madewith this in it
c:/Code/msys/1.0/mingw
c:/torque /torque
IV. building torque
but my torque directory is c:/torque , should it be entered like that? What other lines need to be added to it?
#14
earlier I ran it like this
make -f mk...blah
then
make clean
then
make
how does the command 'make clean' difer from 'make'?
10/23/2003 (2:23 pm)
That worked like a charm. Now I have one question,earlier I ran it like this
make -f mk...blah
then
make clean
then
make
how does the command 'make clean' difer from 'make'?
#15
c:/dir(space here)/dir
so it should be
c:/torque /torque
c:/mingw /mingw
of course putting in the path that it is on your computer
10/23/2003 (2:45 pm)
Actually the fstab file is setup like thisc:/dir(space here)/dir
so it should be
c:/torque /torque
c:/mingw /mingw
of course putting in the path that it is on your computer
#16
10/23/2003 (3:14 pm)
Okay thanks Shay. I'll correct it
#17
I,m new to torque and programming but not too game dev, and it's taken 2 weeks of searching the web and the forums to find the answer to compliling with MinGW - your posts work a treat
03/19/2004 (10:21 am)
Thanks Shay,I,m new to torque and programming but not too game dev, and it's taken 2 weeks of searching the web and the forums to find the answer to compliling with MinGW - your posts work a treat
Associate Ron Yacketta
-Ron