Compiling Super Mario War

Asked by mavsman4457

I am trying to compile Super Mario War for my PS3 and I don't think it is exactly working but I am not knowledgable to know what is wrong or how to fix it so if you couldinstruct me in that it would be great. Also, I've heard that usually when compiling something doesn't work it is because you don't have the right libraries but I don't know what libraries are or how to download/install them so if you could include that in the response I would appreciate it. Anyway, here is what my terminal looked like:

brady@PS3:~/smw$ ./configure
./configure: 55: sdl-config: not found
./configure: 55: sdl-config: not found
rm -rf build/*
rm -f smw
rm -f leveledit
rm -f smw.exe
rm -f leveledit.exe
rm -f options.bin
rm -rf 'Super Mario War.app'
brady@PS3:~/smw$ make
g++ -DLINUXFUNC -DPREFIXPATH=\"/usr/share/smw\" -Wall -I. -DPNG_SAVE_FORMAT -o build/MapList.o -c _src/MapList.cpp
In file included from _src/global.h:21,
                 from _src/MapList.cpp:15:
_src/sfx.h:1:23: error: SDL_mixer.h: No such file or directory
_src/sfx.h:2:17: error: SDL.h: No such file or directory
In file included from _src/global.h:22,
                 from _src/MapList.cpp:15:
_src/gfx.h:24:23: error: SDL_image.h: No such file or directory
_src/sfx.h:35: error: ISO C++ forbids declaration of ‘Mix_Chunk’ with no type
_src/sfx.h:35: error: expected ‘;’ before ‘*’ token
_src/sfx.h:62: error: ISO C++ forbids declaration of ‘Mix_Music’ with no type
_src/sfx.h:62: error: expected ‘;’ before ‘*’ token
_src/SFont.h:53: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/SFont.h:53: error: expected ‘;’ before ‘*’ token
_src/SFont.h:61: error: ‘SDL_Surface’ was not declared in this scope
_src/SFont.h:61: error: ‘Font’ was not declared in this scope
_src/SFont.h:67: error: variable or field ‘SFont_Write’ declared void
_src/SFont.h:67: error: ‘SDL_Surface’ was not declared in this scope
_src/SFont.h:67: error: ‘Surface’ was not declared in this scope
_src/SFont.h:67: error: expected primary-expression before ‘const’
_src/SFont.h:67: error: expected primary-expression before ‘int’
_src/SFont.h:67: error: expected primary-expression before ‘int’
_src/SFont.h:68: error: expected primary-expression before ‘const’
_src/SFont.h:68: error: initializer expression list treated as compound expression
_src/SFont.h:76: error: variable or field ‘SFont_WriteCenter’ declared void
_src/SFont.h:76: error: ‘SDL_Surface’ was not declared in this scope
_src/SFont.h:76: error: ‘Surface’ was not declared in this scope
_src/SFont.h:76: error: expected primary-expression before ‘const’
_src/SFont.h:76: error: expected primary-expression before ‘int’
_src/SFont.h:76: error: expected primary-expression before ‘int’
_src/SFont.h:76: error: expected primary-expression before ‘const’
_src/SFont.h:76: error: initializer expression list treated as compound expression
_src/SFont.h:77: error: variable or field ‘SFont_WriteChopCenter’ declared void
_src/SFont.h:77: error: ‘SDL_Surface’ was not declared in this scope
_src/SFont.h:77: error: ‘Surface’ was not declared in this scope
_src/SFont.h:77: error: expected primary-expression before ‘const’
_src/SFont.h:77: error: expected primary-expression before ‘int’
_src/SFont.h:77: error: expected primary-expression before ‘int’
_src/SFont.h:77: error: expected primary-expression before ‘int’
_src/SFont.h:77: error: expected primary-expression before ‘const’
_src/SFont.h:77: error: initializer expression list treated as compound expression
_src/SFont.h:80: error: variable or field ‘SFont_WriteRight’ declared void
_src/SFont.h:80: error: ‘SDL_Surface’ was not declared in this scope
_src/SFont.h:80: error: ‘Surface’ was not declared in this scope
_src/SFont.h:80: error: expected primary-expression before ‘const’
_src/SFont.h:80: error: expected primary-expression before ‘int’
_src/SFont.h:80: error: expected primary-expression before ‘int’
_src/SFont.h:80: error: expected primary-expression before ‘const’
_src/SFont.h:80: error: initializer expression list treated as compound expression
_src/SFont.h:82: error: variable or field ‘SFont_WriteChopRight’ declared void
_src/SFont.h:82: error: ‘SDL_Surface’ was not declared in this scope
_src/SFont.h:82: error: ‘Surface’ was not declared in this scope
_src/SFont.h:82: error: expected primary-expression before ‘const’
_src/SFont.h:82: error: expected primary-expression before ‘int’
_src/SFont.h:82: error: expected primary-expression before ‘int’
_src/SFont.h:82: error: expected primary-expression before ‘int’
_src/SFont.h:82: error: expected primary-expression before ‘const’
_src/SFont.h:82: error: initializer expression list treated as compound expression
_src/gfx.h:41: error: ‘Uint8’ has not been declared
_src/gfx.h:41: error: ‘Uint8’ has not been declared
_src/gfx.h:41: error: ‘Uint8’ has not been declared
_src/gfx.h:42: error: ‘Uint8’ has not been declared
_src/gfx.h:42: error: ‘Uint8’ has not been declared
_src/gfx.h:42: error: ‘Uint8’ has not been declared
_src/gfx.h:42: error: ‘Uint8’ has not been declared
_src/gfx.h:44: error: ‘Uint8’ has not been declared
_src/gfx.h:44: error: ‘Uint8’ has not been declared
_src/gfx.h:44: error: ‘Uint8’ has not been declared
_src/gfx.h:50: error: ‘Uint8’ has not been declared
_src/gfx.h:55: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/gfx.h:55: error: expected ‘;’ before ‘*’ token
_src/gfx.h:57: error: ‘SDL_Surface’ has not been declared
_src/gfx.h:71: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/gfx.h:71: error: expected ‘;’ before ‘*’ token
_src/gfx.h:72: error: ‘SDL_Rect’ does not name a type
_src/gfx.h:73: error: ‘SDL_Rect’ does not name a type
_src/gfx.h: In member function ‘int gfxSprite::getWidth()’:
_src/gfx.h:52: error: ‘m_picture’ was not declared in this scope
_src/gfx.h: In member function ‘int gfxSprite::getHeight()’:
_src/gfx.h:53: error: ‘m_picture’ was not declared in this scope
_src/gfx.h: In member function ‘void gfxSprite::setSurface(int*)’:
_src/gfx.h:60: error: ‘m_picture’ was not declared in this scope
_src/gfx.h:61: error: ‘m_bltrect’ was not declared in this scope
_src/gfx.h:61: error: ‘Uint16’ was not declared in this scope
_src/gfx.h:61: error: expected `;' before ‘m_picture’
_src/gfx.h:62: error: expected `;' before ‘m_picture’
_src/gfx.h: At global scope:
_src/gfx.h:98: error: ‘Uint8’ has not been declared
_src/input.h:71: error: ‘SDL_Event’ has not been declared
_src/uicontrol.h:558: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/uicontrol.h:558: error: expected ‘;’ before ‘*’ token
_src/uicontrol.h:559: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/uicontrol.h:559: error: expected ‘;’ before ‘*’ token
_src/uicontrol.h:560: error: ‘SDL_Rect’ does not name a type
_src/uicontrol.h:870: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/uicontrol.h:870: error: expected ‘;’ before ‘*’ token
_src/uicontrol.h:881: error: ‘SDL_Rect’ does not name a type
_src/uicontrol.h:882: error: ‘SDL_Rect’ does not name a type
_src/uicontrol.h:910: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/uicontrol.h:910: error: expected ‘;’ before ‘*’ token
_src/uicontrol.h:911: error: ISO C++ forbids declaration of ‘SDL_Rect’ with no type
_src/uicontrol.h:911: error: expected ‘;’ before ‘*’ token
_src/uicontrol.h:912: error: ISO C++ forbids declaration of ‘SDL_Rect’ with no type
_src/uicontrol.h:912: error: expected ‘;’ before ‘*’ token
_src/map.h:78: error: ‘SDL_Surface’ has not been declared
_src/map.h:79: error: ‘SDL_Surface’ has not been declared
_src/map.h:80: error: ‘SDL_Surface’ has not been declared
_src/map.h:81: error: ‘SDL_Surface’ has not been declared
_src/map.h:82: error: ‘SDL_Surface’ has not been declared
_src/map.h:184: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/map.h:184: error: expected ‘;’ before ‘*’ token
_src/map.h:186: error: ‘SDL_Rect’ does not name a type
_src/map.h:187: error: ‘SDL_Rect’ does not name a type
_src/map.h:189: error: ‘SDL_Rect’ does not name a type
_src/map.h:209: error: ‘SDL_Surface’ has not been declared
_src/map.h:210: error: ‘SDL_Surface’ has not been declared
_src/map.h:211: error: ‘SDL_Surface’ has not been declared
_src/map.h:212: error: ‘SDL_Surface’ has not been declared
_src/movingplatform.h:67: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/movingplatform.h:67: error: expected ‘;’ before ‘*’ token
_src/movingplatform.h:69: error: ‘SDL_Rect’ does not name a type
_src/movingplatform.h:70: error: ‘SDL_Rect’ does not name a type
_src/global.h:225: error: expected initializer before ‘*’ token
_src/global.h:226: error: expected initializer before ‘*’ token
_src/global.h:234: error: expected initializer before ‘*’ token
_src/MapList.cpp: In member function ‘bool MapList::startswith(char)’:
_src/MapList.cpp:202: error: ‘SDLK_a’ was not declared in this scope
_src/MapList.cpp:202: error: ‘SDLK_z’ was not declared in this scope
make: *** [build/MapList.o] Error 1
brady@PS3:~/smw$ make install
g++ -DLINUXFUNC -DPREFIXPATH=\"/usr/share/smw\" -Wall -I. -DPNG_SAVE_FORMAT -o build/MapList.o -c _src/MapList.cpp
In file included from _src/global.h:21,
                 from _src/MapList.cpp:15:
_src/sfx.h:1:23: error: SDL_mixer.h: No such file or directory
_src/sfx.h:2:17: error: SDL.h: No such file or directory
In file included from _src/global.h:22,
                 from _src/MapList.cpp:15:
_src/gfx.h:24:23: error: SDL_image.h: No such file or directory
_src/sfx.h:35: error: ISO C++ forbids declaration of ‘Mix_Chunk’ with no type
_src/sfx.h:35: error: expected ‘;’ before ‘*’ token
_src/sfx.h:62: error: ISO C++ forbids declaration of ‘Mix_Music’ with no type
_src/sfx.h:62: error: expected ‘;’ before ‘*’ token
_src/SFont.h:53: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/SFont.h:53: error: expected ‘;’ before ‘*’ token
_src/SFont.h:61: error: ‘SDL_Surface’ was not declared in this scope
_src/SFont.h:61: error: ‘Font’ was not declared in this scope
_src/SFont.h:67: error: variable or field ‘SFont_Write’ declared void
_src/SFont.h:67: error: ‘SDL_Surface’ was not declared in this scope
_src/SFont.h:67: error: ‘Surface’ was not declared in this scope
_src/SFont.h:67: error: expected primary-expression before ‘const’
_src/SFont.h:67: error: expected primary-expression before ‘int’
_src/SFont.h:67: error: expected primary-expression before ‘int’
_src/SFont.h:68: error: expected primary-expression before ‘const’
_src/SFont.h:68: error: initializer expression list treated as compound expression
_src/SFont.h:76: error: variable or field ‘SFont_WriteCenter’ declared void
_src/SFont.h:76: error: ‘SDL_Surface’ was not declared in this scope
_src/SFont.h:76: error: ‘Surface’ was not declared in this scope
_src/SFont.h:76: error: expected primary-expression before ‘const’
_src/SFont.h:76: error: expected primary-expression before ‘int’
_src/SFont.h:76: error: expected primary-expression before ‘int’
_src/SFont.h:76: error: expected primary-expression before ‘const’
_src/SFont.h:76: error: initializer expression list treated as compound expression
_src/SFont.h:77: error: variable or field ‘SFont_WriteChopCenter’ declared void
_src/SFont.h:77: error: ‘SDL_Surface’ was not declared in this scope
_src/SFont.h:77: error: ‘Surface’ was not declared in this scope
_src/SFont.h:77: error: expected primary-expression before ‘const’
_src/SFont.h:77: error: expected primary-expression before ‘int’
_src/SFont.h:77: error: expected primary-expression before ‘int’
_src/SFont.h:77: error: expected primary-expression before ‘int’
_src/SFont.h:77: error: expected primary-expression before ‘const’
_src/SFont.h:77: error: initializer expression list treated as compound expression
_src/SFont.h:80: error: variable or field ‘SFont_WriteRight’ declared void
_src/SFont.h:80: error: ‘SDL_Surface’ was not declared in this scope
_src/SFont.h:80: error: ‘Surface’ was not declared in this scope
_src/SFont.h:80: error: expected primary-expression before ‘const’
_src/SFont.h:80: error: expected primary-expression before ‘int’
_src/SFont.h:80: error: expected primary-expression before ‘int’
_src/SFont.h:80: error: expected primary-expression before ‘const’
_src/SFont.h:80: error: initializer expression list treated as compound expression
_src/SFont.h:82: error: variable or field ‘SFont_WriteChopRight’ declared void
_src/SFont.h:82: error: ‘SDL_Surface’ was not declared in this scope
_src/SFont.h:82: error: ‘Surface’ was not declared in this scope
_src/SFont.h:82: error: expected primary-expression before ‘const’
_src/SFont.h:82: error: expected primary-expression before ‘int’
_src/SFont.h:82: error: expected primary-expression before ‘int’
_src/SFont.h:82: error: expected primary-expression before ‘int’
_src/SFont.h:82: error: expected primary-expression before ‘const’
_src/SFont.h:82: error: initializer expression list treated as compound expression
_src/gfx.h:41: error: ‘Uint8’ has not been declared
_src/gfx.h:41: error: ‘Uint8’ has not been declared
_src/gfx.h:41: error: ‘Uint8’ has not been declared
_src/gfx.h:42: error: ‘Uint8’ has not been declared
_src/gfx.h:42: error: ‘Uint8’ has not been declared
_src/gfx.h:42: error: ‘Uint8’ has not been declared
_src/gfx.h:42: error: ‘Uint8’ has not been declared
_src/gfx.h:44: error: ‘Uint8’ has not been declared
_src/gfx.h:44: error: ‘Uint8’ has not been declared
_src/gfx.h:44: error: ‘Uint8’ has not been declared
_src/gfx.h:50: error: ‘Uint8’ has not been declared
_src/gfx.h:55: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/gfx.h:55: error: expected ‘;’ before ‘*’ token
_src/gfx.h:57: error: ‘SDL_Surface’ has not been declared
_src/gfx.h:71: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/gfx.h:71: error: expected ‘;’ before ‘*’ token
_src/gfx.h:72: error: ‘SDL_Rect’ does not name a type
_src/gfx.h:73: error: ‘SDL_Rect’ does not name a type
_src/gfx.h: In member function ‘int gfxSprite::getWidth()’:
_src/gfx.h:52: error: ‘m_picture’ was not declared in this scope
_src/gfx.h: In member function ‘int gfxSprite::getHeight()’:
_src/gfx.h:53: error: ‘m_picture’ was not declared in this scope
_src/gfx.h: In member function ‘void gfxSprite::setSurface(int*)’:
_src/gfx.h:60: error: ‘m_picture’ was not declared in this scope
_src/gfx.h:61: error: ‘m_bltrect’ was not declared in this scope
_src/gfx.h:61: error: ‘Uint16’ was not declared in this scope
_src/gfx.h:61: error: expected `;' before ‘m_picture’
_src/gfx.h:62: error: expected `;' before ‘m_picture’
_src/gfx.h: At global scope:
_src/gfx.h:98: error: ‘Uint8’ has not been declared
_src/input.h:71: error: ‘SDL_Event’ has not been declared
_src/uicontrol.h:558: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/uicontrol.h:558: error: expected ‘;’ before ‘*’ token
_src/uicontrol.h:559: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/uicontrol.h:559: error: expected ‘;’ before ‘*’ token
_src/uicontrol.h:560: error: ‘SDL_Rect’ does not name a type
_src/uicontrol.h:870: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/uicontrol.h:870: error: expected ‘;’ before ‘*’ token
_src/uicontrol.h:881: error: ‘SDL_Rect’ does not name a type
_src/uicontrol.h:882: error: ‘SDL_Rect’ does not name a type
_src/uicontrol.h:910: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/uicontrol.h:910: error: expected ‘;’ before ‘*’ token
_src/uicontrol.h:911: error: ISO C++ forbids declaration of ‘SDL_Rect’ with no type
_src/uicontrol.h:911: error: expected ‘;’ before ‘*’ token
_src/uicontrol.h:912: error: ISO C++ forbids declaration of ‘SDL_Rect’ with no type
_src/uicontrol.h:912: error: expected ‘;’ before ‘*’ token
_src/map.h:78: error: ‘SDL_Surface’ has not been declared
_src/map.h:79: error: ‘SDL_Surface’ has not been declared
_src/map.h:80: error: ‘SDL_Surface’ has not been declared
_src/map.h:81: error: ‘SDL_Surface’ has not been declared
_src/map.h:82: error: ‘SDL_Surface’ has not been declared
_src/map.h:184: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/map.h:184: error: expected ‘;’ before ‘*’ token
_src/map.h:186: error: ‘SDL_Rect’ does not name a type
_src/map.h:187: error: ‘SDL_Rect’ does not name a type
_src/map.h:189: error: ‘SDL_Rect’ does not name a type
_src/map.h:209: error: ‘SDL_Surface’ has not been declared
_src/map.h:210: error: ‘SDL_Surface’ has not been declared
_src/map.h:211: error: ‘SDL_Surface’ has not been declared
_src/map.h:212: error: ‘SDL_Surface’ has not been declared
_src/movingplatform.h:67: error: ISO C++ forbids declaration of ‘SDL_Surface’ with no type
_src/movingplatform.h:67: error: expected ‘;’ before ‘*’ token
_src/movingplatform.h:69: error: ‘SDL_Rect’ does not name a type
_src/movingplatform.h:70: error: ‘SDL_Rect’ does not name a type
_src/global.h:225: error: expected initializer before ‘*’ token
_src/global.h:226: error: expected initializer before ‘*’ token
_src/global.h:234: error: expected initializer before ‘*’ token
_src/MapList.cpp: In member function ‘bool MapList::startswith(char)’:
_src/MapList.cpp:202: error: ‘SDLK_a’ was not declared in this scope
_src/MapList.cpp:202: error: ‘SDLK_z’ was not declared in this scope
make: *** [build/MapList.o] Error 1

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
mavsman4457
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Gord Allott (gordallott) said :
#1

you need to install something called SDL, its important to know by the way that compiling is not for the feint hearted :)

to make it easy just run
sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev

without knowing what the application needs to compile though this is just a guess

-- gord

Revision history for this message
mavsman4457 (bdsport445) said :
#2

OK thanks for that I just installed SDL and tried compiling it again and it gave me a lot less text but I am still going to need some help. Here's what I got:

brady@PS3:~/smw$ ./configure
rm -rf build/*
rm -f smw
rm -f leveledit
rm -f smw.exe
rm -f leveledit.exe
rm -f options.bin
rm -rf 'Super Mario War.app'
brady@PS3:~/smw$ make
g++ -DLINUXFUNC -DPREFIXPATH=\"/usr/share/smw\" -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wall -I. -DPNG_SAVE_FORMAT -o build/MapList.o -c _src/MapList.cpp
In file included from _src/global.h:21,
                 from _src/MapList.cpp:15:
_src/sfx.h:1:23: error: SDL_mixer.h: No such file or directory
_src/sfx.h:35: error: ISO C++ forbids declaration of ‘Mix_Chunk’ with no type
_src/sfx.h:35: error: expected ‘;’ before ‘*’ token
_src/sfx.h:62: error: ISO C++ forbids declaration of ‘Mix_Music’ with no type
_src/sfx.h:62: error: expected ‘;’ before ‘*’ token
make: *** [build/MapList.o] Error 1
brady@PS3:~/smw$ make install
g++ -DLINUXFUNC -DPREFIXPATH=\"/usr/share/smw\" -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wall -I. -DPNG_SAVE_FORMAT -o build/MapList.o -c _src/MapList.cpp
In file included from _src/global.h:21,
                 from _src/MapList.cpp:15:
_src/sfx.h:1:23: error: SDL_mixer.h: No such file or directory
_src/sfx.h:35: error: ISO C++ forbids declaration of ‘Mix_Chunk’ with no type
_src/sfx.h:35: error: expected ‘;’ before ‘*’ token
_src/sfx.h:62: error: ISO C++ forbids declaration of ‘Mix_Music’ with no type
_src/sfx.h:62: error: expected ‘;’ before ‘*’ token
make: *** [build/MapList.o] Error 1

Revision history for this message
mavsman4457 (bdsport445) said :
#3

I had to also do:
sudo apt-get install libsdl-mixer1.2-dev

Revision history for this message
mavsman4457 (bdsport445) said :
#4

OK sorry I had to reinstall ubuntu and now I am back to installing SMW. Now when I try to do ./configure it doesn't even work. It gives me this:

brady@PS3:~$ cd '/home/brady/smw'
brady@PS3:~/smw$ ./configure
bash: ./configure: Permission denied
brady@PS3:~/smw$ sudo ./configure
sudo: ./configure: command not found

Revision history for this message
mavsman4457 (bdsport445) said :
#5

Nevermind sorry I just needed a different revision.

Revision history for this message
Best mavsman4457 (bdsport445) said :
#6

^ That solved my problem.