Need help with compiling (using Code::Blocks)

Status
Not open for further replies.

Internet Explorer

IT'S NO USE
Here is what I did. I used the provided archive with SRB2 to extract the source code. Then, I just edited some numbers in the source code, related to the weapon fire rate, or to the max amount the player can wear (or also the weapon name which appear on the console). Nothing related to C functions or other C langage stuff, just value editing.
When I was done with my edit, I downloaded the libraries directx8.tar.gz, dxguid.lib and FMOD.tar.gz from here. I copied dxguid.lib into the folders C:\mingw32 and C:\Program Files\CodeBlocks. I extracted the two archives (directx8.tar.gz and FMOD.tar.gz) as well in these folders.
(I set the libraries in two folders, by hoping the compiling will work.)
Then, I run Code::Blocks, my IDE. I go to File > Open, and I choose the Srb2win.dev, situated in src\win32 (I made that dev file by importing srb2win.dsp in Dev-C++). They ask me what compiler to use, I let the GNU GCC compiler. Then, I push the "Build" button...
And here is the build log.
-------------- Build: default in Srb2win ---------------

Compiling: ..\r_draw16.c
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c: In function 'R_DrawColumn_16':
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:33: error: 'INT32' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:33: error: (Each undeclared identifier is reported only once
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:33: error: for each function it appears in.)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:33: error: expected ';' before 'count'
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:34: error: 'INT16' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:34: error: 'dest' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:35: error: 'fixed_t' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:35: error: expected ';' before 'frac'
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:37: error: 'count' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:37: error: 'dc_yh' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:37: error: 'dc_yl' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:51: error: expected expression before ')' token
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:51: error: 'ylookup' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:51: error: 'columnofs' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:51: error: 'dc_x' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:54: error: 'fracstep' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:54: error: 'dc_iscale' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:55: error: 'frac' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:55: error: 'dc_texturemid' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:55: error: 'centery' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:63: error: 'hicolormaps' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:63: error: expected expression before ')' token
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:63: error: expected ')' before 'dc_source'
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:63: error: 'FRACBITS' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:65: error: 'vid' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c: In function 'R_DrawWallColumn_16':
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:76: error: 'INT32' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:76: error: expected ';' before 'count'
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:77: error: 'INT16' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:77: error: 'dest' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:78: error: 'fixed_t' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:78: error: expected ';' before 'frac'
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:80: error: 'count' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:80: error: 'dc_yh' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:80: error: 'dc_yl' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:91: error: expected expression before ')' token
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:91: error: 'ylookup' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:91: error: 'columnofs' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:91: error: 'dc_x' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:93: error: 'fracstep' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:93: error: 'dc_iscale' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:94: error: 'frac' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:94: error: 'dc_texturemid' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:94: error: 'centery' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:98: error: 'hicolormaps' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:98: error: expected expression before ')' token
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:98: error: expected ')' before 'dc_source'
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:98: error: 'FRACBITS' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:100: error: 'vid' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c: In function 'R_DrawTranslucentColumn_16':
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:111: error: 'INT32' undeclared (first use in this function)
C:\Documents and Settings\HP_Administrator\Bureau\src\src\r_draw16.c:111: error: expected ';' before 'count'
Process terminated with status 1 (0 minutes, 4 seconds)
50 errors, 0 warnings

I don't know if I even used the correct "project", like the Wiki says, since it doesn't precise which file is the "project". That tutorial is fuzzy for me...
Thank you in advance for any help.
 
Last edited:
Compiling with Code::Blocks under Windows is not supported

Sent from my SGH-T999 using Tapatalk 2
 
Why shouldn't it be supported on Windows ?
Here some evidences...
20rqdi.jpg
Also, here is a little program I made, just to show compiling is possible...
291p9u0.jpg
It works on Windows 7 & Windows XP.
 
I'm pretty sure he meant "compiling SRB2 with Code::Blocks under Windows is not supported".

Yea, to compile SRB2's Code::Block Project file, it requires a Linux/GNU system or Windows system outfited with MSYS, Cygwin or GNUWin32 programs, and the Subversion CLI programs.

P.S. I make the project file on Linux/GNU just for kicks, note that! MUHAHAHAHAH!

Sent from my SGH-T999 using Tapatalk 2
 
Okey then ;
I tried with a recommandation of SpiritCrusher and the Wiki, "GNU Make with TDM-GCC". So, I install the 'software', I extract the libraries into C:/MinGW, and I access to the console with Start > Run > cmd.exe.
I navigate into the folder containing the source code I edited with the command cd [folder], and then I type cd src to access to the source code, like Wiki says. I finally type mingw32-make MINGW=1 to compile,but I get an error I can't solve...
2m5029u.jpg
(I replaced the french messages with english ones.)
The name of the folder containing my edited code is called "code", like the picture displays. I don't know what is wrong, I did exactly what the Wiki said...
I also tried to compile with three different computers, but I get the same error message-
 
Okey, let's try with this one.
I changed NASM=X:\PATH\TO\nasm.exe to NASM=C:\MinGW\bin\nasm.exe. I downloaded the nasm.exe file from here. The folder which contains the SRB2 source code is still called "code".
Here is the console code it displays :

Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Marisa Kirisame>cd desktop
C:\Documents and Settings\Marisa Kirisame\desktop>cd code
C:\Documents and Settings\Marisa Kirisame\desktop\code>cd src
C:\Documents and Settings\Marisa Kirisame\desktop\code\src>mingw32-make MINGW=1 CC=gcc WINDOWSHELL=1 NASM=C:\MinGW\bin\nasm.exe
..\comptime.bat .
'svnversion' is not recognized as internal or
external command, operable program or batch file.
gcc -I../libs/libpng-src -I../libs/zlib -DHAVE_MINIUPNPC -g -fno-exceptions -DST
DC_HEADERS -D_WINDOWS -D__USE_MINGW_ANSI_STDIO=0 -DHWRENDER -DHW3SOUND -DCOMPVER
SION -DUSEASM -DHAVE_PNG -I../libs/ -DSTATIC_MINIUPNPC -march=pentium -Os -DNDEB
UG -Wall -Wformat-y2k -Wformat-security -c comptime.c -o ../objs/Mingw/Release/
comptime.o
gcc -I../libs/libpng-src -I../libs/zlib -DHAVE_MINIUPNPC -g -fno-exceptions -DST
DC_HEADERS -D_WINDOWS -D__USE_MINGW_ANSI_STDIO=0 -DHWRENDER -DHW3SOUND -DCOMPVER
SION -DUSEASM -DHAVE_PNG -I../libs/ -DSTATIC_MINIUPNPC -march=pentium -Os -DNDEB
UG -Wall -Wformat-y2k -Wformat-security -c p_user.c -o ../objs/Mingw/Release/p_
user.o
p_user.c: In function 'P_DoSuperTransformation':
p_user.c:925:31: error: request for member 'nossmusic' in something not a struct
ure or union
p_user.c:948:31: error: request for member 'nossmusic' in something not a struct
ure or union
p_user.c: In function 'P_AddPlayerScore':
p_user.c:977:32: error: request for member 'typeoflevel' in something not a stru
cture or union
p_user.c: In function 'P_RestoreMusic':
p_user.c:1015:61: error: request for member 'nossmusic' in something not a struc
ture or union
p_user.c:1020:59: error: request for member 'nossmusic' in something not a struc
ture or union
p_user.c:1035:53: error: request for member 'speedmusic' in something not a stru
cture or union
p_user.c: In function 'P_GetPlayerControlDirection':
p_user.c:2201:10: warning: variable 'controldirection' set but not used [-Wunuse
d-but-set-variable]
p_user.c: In function 'P_MovePlayer':
p_user.c:5572:32: warning: variable 'bluearray' set but not used [-Wunused-but-s
et-variable]
p_user.c:5572:10: warning: variable 'redarray' set but not used [-Wunused-but-se
t-variable]
p_user.c:6120:32: error: request for member 'typeoflevel' in something not a str
ucture or union
p_user.c:6339:104: error: request for member 'nossmusic' in something not a stru
cture or union
p_user.c: In function 'P_PlayerThink':
p_user.c:9627:32: error: expected ')' before 'PRIdS'
p_user.c:9627:32: warning: spurious trailing '%' in format [-Wformat]
p_user.c:9616:15: warning: unused variable 'playeri' [-Wunused-variable]
mingw32-make: *** [../objs/Mingw/Release/p_user.o] Error 1
C:\Documents and Settings\Marisa Kirisame\desktop\code\src>
 
Status
Not open for further replies.

Who is viewing this thread (Total: 2, Members: 0, Guests: 2)

Back
Top