Help with compiling in Windows XP

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
Post Reply
User avatar
HolyDragoon
Trained
Trained
Posts: 60
Joined: 13 Jun 2008, 13:02
Location: Portugal

Help with compiling in Windows XP

Post by HolyDragoon »

So, I'm trying to compile the source files in Windows XP, but I don't understand the "Setting things up to get ready for compiling" part of this page: http://wiki.wz2100.net/Windows_Compile_ ... 28MinGW%29. Can somebody shed some light on me? I understand the part of using the command line, but the beginning eludes me a little...
"Relativity applies to Physics, not Ethics." - Albert Einstein
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Help with compiling in Windows XP

Post by DevUrandom »

HolyDragoon wrote:So, I'm trying to compile the source files in Windows XP, but I don't understand the "Setting things up to get ready for compiling" part of this page: http://wiki.wz2100.net/Windows_Compile_ ... 28MinGW%29. Can somebody shed some light on me? I understand the part of using the command line, but the beginning eludes me a little...
I've updated the guide to what we currently have in trunk. I hope that helps. If not, ask again.
User avatar
HolyDragoon
Trained
Trained
Posts: 60
Joined: 13 Jun 2008, 13:02
Location: Portugal

Re: Help with compiling in Windows XP

Post by HolyDragoon »

Hmm, it seems like i still have one error...

Code: Select all

C:\cmp>mingw32-make -f Makefile.raw
mingw32-make: Makefile.raw: No such file or directory
mingw32-make: *** No rule to make target `Makefile.raw'.  Stop.
What can cause this?
"Relativity applies to Physics, not Ethics." - Albert Einstein
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Help with compiling in Windows XP

Post by cybersphinx »

Use Makefile.win32 instead of Makefile.raw, they were renamed recently.
User avatar
HolyDragoon
Trained
Trained
Posts: 60
Joined: 13 Jun 2008, 13:02
Location: Portugal

Re: Help with compiling in Windows XP

Post by HolyDragoon »

Same error, but this time it begins to run.

Code: Select all

C:\cmp>mingw32-make -f Makefile.win32
Checking config...
PACKAGE_VERSION := TRUNK
MODE := debug
DEVDIR := C:/devpkg
Config seems valid.
mingw32-make[1]: Entering directory `C:/cmp/build_tools'
mingw32-make[1]: makefile.raw: No such file or directory
mingw32-make[1]: *** No rule to make target `makefile.raw'.  Stop.
mingw32-make[1]: Leaving directory `C:/cmp/build_tools'
mingw32-make: *** [build_tools] Error 2
Why does it keep pointing to makefile.raw? Was it suppposed to point there, or should it point to makefile.win32?
"Relativity applies to Physics, not Ethics." - Albert Einstein
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Help with compiling in Windows XP

Post by DevUrandom »

HolyDragoon wrote:Same error, but this time it begins to run.

Code: Select all

C:\cmp>mingw32-make -f Makefile.win32
Checking config...
PACKAGE_VERSION := TRUNK
MODE := debug
DEVDIR := C:/devpkg
Config seems valid.
mingw32-make[1]: Entering directory `C:/cmp/build_tools'
mingw32-make[1]: makefile.raw: No such file or directory
mingw32-make[1]: *** No rule to make target `makefile.raw'.  Stop.
mingw32-make[1]: Leaving directory `C:/cmp/build_tools'
mingw32-make: *** [build_tools] Error 2
Why does it keep pointing to makefile.raw? Was it suppposed to point there, or should it point to makefile.win32?
My mistake, sorry.
Corrected in svn, please update.
User avatar
HolyDragoon
Trained
Trained
Posts: 60
Joined: 13 Jun 2008, 13:02
Location: Portugal

Re: Help with compiling in Windows XP

Post by HolyDragoon »

Heh, guess what.

Code: Select all

C:\cmp>mingw32-make -f makefile.win32
Checking config...
PACKAGE_VERSION := TRUNK
MODE := debug
DEVDIR := C:/devpkg
Config seems valid.
mingw32-make[1]: Entering directory `C:/cmp/build_tools'
mingw32-make[2]: Entering directory `C:/cmp/build_tools/autorevision'
makefile.win32:29: warning: overriding commands for target `clean'
../.././makerules/exe.mk:13: warning: ignoring old commands for target `clean'
g++ -std=gnu99 -g -O0 -Wall -Werror-implicit-function-declaration   -o autorevis
ion autorevision.o
autorevision +cstr -v ..\\..\\. ..\\..\\.\\src\\autorevision.h
[u]'svnversion' não é reconhecido como um comando interno ou externo,
programa operacional ou ficheiro batch.
'svn' não é reconhecido como um comando interno ou externo,
programa operacional ou ficheiro batch.
'git-svn' não é reconhecido como um comando interno ou externo,
programa operacional ou ficheiro batch.
'git-rev-list' não é reconhecido como um comando interno ou externo,
programa operacional ou ficheiro batch.[/u]
Revision unchanged (5459). Skipping.
old = "5459"; new = "5459"
mingw32-make[2]: Leaving directory `C:/cmp/build_tools/autorevision'
mingw32-make[1]: Leaving directory `C:/cmp/build_tools'
mingw32-make[1]: Entering directory `C:/cmp/po'
mingw32-make[1]: Nothing to be done for `all'.
mingw32-make[1]: Leaving directory `C:/cmp/po'
mingw32-make[1]: Entering directory `C:/cmp/win32'
del /F warzone2100.o
Não foi possível localizar C:\cmp\win32\warzone2100.o
mingw32-make[1]: Leaving directory `C:/cmp/win32'
mingw32-make[1]: Entering directory `C:/cmp/lib'
mingw32-make[2]: Entering directory `C:/cmp/lib/framework'
mingw32-gcc -I../../. -DPACKAGE=\"warzone2100\" -DPACKAGE_VERSION=\"TRUNK\" -DYY
_STATIC -IC:/devpkg/include/SDL -IC:/devpkg/include/libpng12 -IC:/devpkg/include
/bfd -IC:/devpkg/include -DDEBUG -DWIN32  -std=gnu99 -g -O0 -Wall -Werror-implic
it-function-declaration -mwindows  -c -o configfile.o configfile.c
In file included from frame.h:33,
                 from configfile.c:21:
types.h:38:23: SDL_types.h: No such file or directory
In file included from frame.h:45,
                 from configfile.c:21:
cursors.h:27:23: SDL_mouse.h: No such file or directory
In file included from frame.h:45,
                 from configfile.c:21:
cursors.h:67: error: syntax error before '*' token
cursors.h:67: warning: type defaults to `int' in declaration of `init_system_cur
sor'
cursors.h:67: warning: data definition has no type or storage class
cursors.h:68: error: syntax error before '*' token
cursors.h:68: warning: type defaults to `int' in declaration of `init_system_cur
sor16'
cursors.h:68: warning: data definition has no type or storage class
cursors.h:69: error: syntax error before '*' token
cursors.h:69: warning: type defaults to `int' in declaration of `init_system_cur
sor32'
cursors.h:69: warning: data definition has no type or storage class
In file included from configfile.c:26:
file.h:22:20: physfs.h: No such file or directory
In file included from configfile.c:26:
file.h:25: error: syntax error before '*' token
file.h:25: warning: type defaults to `int' in declaration of `openLoadFile'
file.h:25: warning: data definition has no type or storage class
file.h:28: error: syntax error before '*' token
file.h:28: warning: type defaults to `int' in declaration of `openSaveFile'
file.h:28: warning: data definition has no type or storage class
configfile.c: In function `registry_load':
configfile.c:183: error: implicit declaration of function `PHYSFS_exists'
configfile.c:212: error: implicit declaration of function `sscanf'
configfile.c: In function `registry_save':
configfile.c:247: error: implicit declaration of function `snprintf'
mingw32-make[2]: *** [configfile.o] Error 1
mingw32-make[2]: Leaving directory `C:/cmp/lib/framework'
mingw32-make[1]: *** [framework] Error 2
mingw32-make[1]: Leaving directory `C:/cmp/lib'
mingw32-make: *** [lib] Error 2
The parts between the code... cmd.exe can't call those commands. I'm no star at command lines, but i can manage through it. This tiny bits though prove themselves to be a challenge to me. i hope there's noone crazy enough to do what i'm trying to accomplish here :D
"Relativity applies to Physics, not Ethics." - Albert Einstein
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Help with compiling in Windows XP

Post by cybersphinx »

The stuff between the s doesn't matter, but you're missing the SDL includes (aren't those in the dev-package?).
User avatar
HolyDragoon
Trained
Trained
Posts: 60
Joined: 13 Jun 2008, 13:02
Location: Portugal

Re: Help with compiling in Windows XP

Post by HolyDragoon »

No, i have those files... and the path is correct,too...

Wait, i think i found the problem.

EDIT: Yup, this problem is solved, i think... now i have a new problem:

Code: Select all

flex  -o resource_lexer.lex.c resource_lexer.l
flex: can't open resource_lexer.lex.c
mingw32-make[2]: *** [resource_lexer.lex.c] Error 1
rm resource_parser.tab.c
mingw32-make[2]: Leaving directory `C:/cmp/lib/framework'
mingw32-make[1]: *** [framework] Error 2
mingw32-make[1]: Leaving directory `C:/cmp/lib'
mingw32-make: *** [lib] Error 2
"Relativity applies to Physics, not Ethics." - Albert Einstein
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Help with compiling in Windows XP

Post by DevUrandom »

cybersphinx wrote:The stuff between the s doesn't matter, but you're missing the SDL includes (aren't those in the dev-package?).

They are in the devpkg, yes.

As to the issues with flex:
Before I change the svn blindly, I would like you to try something:
Open makerules/common.mk and look for "%.lex.h %.lex.c: %.l". In the next line you will see a "-o $...". Remove the space, so it looks like "-o$...".
Maybe that helps...
User avatar
HolyDragoon
Trained
Trained
Posts: 60
Joined: 13 Jun 2008, 13:02
Location: Portugal

Re: Help with compiling in Windows XP

Post by HolyDragoon »

Well, that helped...

Code: Select all

mingw32-ar rcv ..\\..\\.\\lib\\libframework.a configfile.o cursors.o cursors16.
 cursors32.o debug.o frame.o frameresource.o input.o i18n.o lexer_input.o print
_ext.o resource_parser.tab.o resource_lexer.lex.o strnlen1.o strres.o strres_pa
ser.tab.o strres_lexer.lex.o tagfile.o treap.o trig.o SDL_framerate.o
process_begin: CreateProcess(NULL, mingw32-ar rcv ..\..\.\lib\libframework.a co
figfile.o cursors.o cursors16.o cursors32.o debug.o frame.o frameresource.o inp
t.o i18n.o lexer_input.o printf_ext.o resource_parser.tab.o resource_lexer.lex.
 strnlen1.o strres.o strres_parser.tab.o strres_lexer.lex.o tagfile.o treap.o t
ig.o SDL_framerate.o, ...) failed.
make (e=2): O sistema nÒo conseguiu localizar o ficheiro especificado.
mingw32-make[2]: *** [../.././lib/libframework.a] Error 2
mingw32-make[2]: Leaving directory `C:/cmp/lib/framework'
mingw32-make[1]: *** [framework] Error 2
mingw32-make[1]: Leaving directory `C:/cmp/lib'
mingw32-make: *** [lib] Error 2
"You know you make progress when each error is a new one..." :P
"Relativity applies to Physics, not Ethics." - Albert Einstein
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Help with compiling in Windows XP

Post by DevUrandom »

makerules/configure.mk -> Replace "mingw32-ar" with "ar".
Seems the precompiled MinGW has a very inconsistent naming scheme...
User avatar
HolyDragoon
Trained
Trained
Posts: 60
Joined: 13 Jun 2008, 13:02
Location: Portugal

Re: Help with compiling in Windows XP

Post by HolyDragoon »

Another error...

Code: Select all

C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot fin
d -lGLU
collect2: ld returned 1 exit status
mingw32-make[1]: *** [warzone2100.exe] Error 1
mingw32-make[1]: Leaving directory `C:/cmp/src'
mingw32-make: *** [src] Error 2
Also, the folders now show a little symbol, like a tick in almost all folders, but the makrules foloder has an exclamation mark.
"Relativity applies to Physics, not Ethics." - Albert Einstein
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Help with compiling in Windows XP

Post by Buginator »

HolyDragoon wrote:Another error...

Code: Select all

C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot fin
d -lGLU
collect2: ld returned 1 exit status
mingw32-make[1]: *** [warzone2100.exe] Error 1
mingw32-make[1]: Leaving directory `C:/cmp/src'
mingw32-make: *** [src] Error 2
Also, the folders now show a little symbol, like a tick in almost all folders, but the makrules foloder has an exclamation mark.
Did you install the correct libs ? GLU should have been part of the mingw/msys package.

You may also want to try the MSVC build, but you need to download a pretty large SDK (platform SDK), the actual compiler itself (free), and all the libs/headers for the libs we use.
User avatar
HolyDragoon
Trained
Trained
Posts: 60
Joined: 13 Jun 2008, 13:02
Location: Portugal

Re: Help with compiling in Windows XP

Post by HolyDragoon »

I don't know anymore... my brain fried with the heat here... looks like i won't be able to run WZ in this computer anymore too :P
"Relativity applies to Physics, not Ethics." - Albert Einstein
Post Reply