GP32 Setting Up Enviroment For Compiling For Windows


Rekelon

Still Fresh
Joined
Apr 23, 2006
Messages
11
Hi, i have been spending this weekend trying to set up codeblock and i have managed to compile programs for the gp2x however when i try to compile in gcc for windows it will spit out error messages,
I have tried several guides to installing sdl for window however it isn't working (as shown below) so if anyone could give me some feedback on this then i would appreciate it alot


Thanks

Project : NewTest
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\Richard\My Documents\project\test\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: sdltest.cpp
sdltest.cpp:23:21: SDL_ttf.h: No such file or directory
sdltest.cpp:24:23: SDL_image.h: No such file or directory
sdltest.cpp:25:23: SDL_mixer.h: No such file or directory
In file included from sdltest.cpp:26:
sdltest.h:30: error: expected constructor, destructor, or type conversion before '*' token
sdltest.h:30: error: expected `,' or `;' before '*' token
sdltest.h:31: error: expected constructor, destructor, or type conversion before '*' token
sdltest.h:31: error: expected `,' or `;' before '*' token
sdltest.h:32: error: expected constructor, destructor, or type conversion before '*' token
sdltest.h:32: error: expected `,' or `;' before '*' token
sdltest.h: In function `void Shutdown()':
sdltest.h:38: error: `sound' undeclared (first use this function)
sdltest.h:38: error: (Each undeclared identifier is reported only once for each function it appears in.)
sdltest.h:38: error: `Mix_FreeChunk' undeclared (first use this function)
sdltest.h:39: error: `music' undeclared (first use this function)
sdltest.h:39: error: `Mix_FreeMusic' undeclared (first use this function)
sdltest.h:40: error: `Mix_CloseAudio' undeclared (first use this function)
sdltest.h:41: error: `font' undeclared (first use this function)
sdltest.h:41: error: `TTF_CloseFont' undeclared (first use this function)
sdltest.h:42: error: `TTF_Quit' undeclared (first use this function)
sdltest.h:49: error: `chdir' undeclared (first use this function)
sdltest.h:50: error: `execl' undeclared (first use this function)
sdltest.h: In function `void LoadFont(u8)':
sdltest.h:56: error: `font' undeclared (first use this function)
sdltest.h:56: error: `TTF_OpenFont' undeclared (first use this function)
sdltest.h: In function `void drawText(SDL_Surface*, char*, int, int, int, int, int)':
sdltest.h:62: error: `font' undeclared (first use this function)
sdltest.h:62: error: `TTF_RenderText_Blended' undeclared (first use this function)
sdltest.h: In function `void drawTextInt(SDL_Surface*, int, int, int, int, int, int)':
sdltest.h:73: error: `font' undeclared (first use this function)
sdltest.h:73: error: `TTF_RenderText_Blended' undeclared (first use this function)
sdltest.cpp: In function `void TestSDLImage()':
sdltest.cpp:50: error: `IMG_Load' undeclared (first use this function)
sdltest.cpp: In function `void TestSDLMixerWAV()':
sdltest.cpp:217: error: `sound' undeclared (first use this function)
sdltest.cpp:217: error: `Mix_LoadWAV' undeclared (first use this function)
sdltest.cpp:218: error: `Mix_PlayChannel' undeclared (first use this function)
sdltest.cpp:219: error: `Mix_Playing' undeclared (first use this function)
sdltest.cpp: In function `void TestSDLMixerOGG()':
sdltest.cpp:239: error: `music' undeclared (first use this function)
sdltest.cpp:239: error: `Mix_LoadMUS' undeclared (first use this function)
sdltest.cpp:240: error: `Mix_PlayMusic' undeclared (first use this function)
sdltest.cpp:270: error: `Mix_VolumeMusic' undeclared (first use this function)
sdltest.cpp:277: error: `Mix_PauseMusic' undeclared (first use this function)
sdltest.cpp:278: error: `Mix_ResumeMusic' undeclared (first use this function)
sdltest.cpp:281: error: `Mix_RewindMusic' undeclared (first use this function)
sdltest.cpp:324: error: `Mix_HaltMusic' undeclared (first use this function)
sdltest.cpp: In function `void TestSDLMixerMOD()':
sdltest.cpp:337: error: `music' undeclared (first use this function)
sdltest.cpp:337: error: `Mix_LoadMUS' undeclared (first use this function)
sdltest.cpp:338: error: `Mix_PlayMusic' undeclared (first use this function)
sdltest.cpp:342: error: `Mix_HaltMusic' undeclared (first use this function)
sdltest.cpp: In function `int SDL_main(int, char**)':
sdltest.cpp:388: error: `TTF_Init' undeclared (first use this function)
sdltest.cpp:389: error: `MIX_DEFAULT_FREQUENCY' undeclared (first use this function)
sdltest.cpp:389: error: `MIX_DEFAULT_CHANNELS' undeclared (first use this function)
sdltest.cpp:389: error: `Mix_OpenAudio' undeclared (first use this function)
Process terminated with status 1 (0 minutes, 1 seconds)
 
I don't use codeblocks but it just sounds like the sdl.h and related .h files are not in your include path.

Check your compiler and/or project settings for "include" folders/paths and make sure whatever folder has your SDL_*.h files is in the list.
 
pvanukoff posted on May 1 2006 at 09:02 PM said:
I don't use codeblocks but it just sounds like the sdl.h and related .h files are not in your include path.

Check your compiler and/or project settings for "include" folders/paths and make sure whatever folder has your SDL_*.h files is in the list.

*Should make a comment that i accidently posted this in 32 instread of 2x, could this be moved over pelase


Sorry for the late reply been having alot things to do here >_<. Anyway i followed lazy foo guide to settle this up however the complier started to ask for sdl_ttf, sdl_image and sdl_mixer so i downloaded the file and copied them into the correct folder and of course addded the linkers however it started to throw a woppely about the chdir command and excel so i // them out to see if it would compile however it says "cannot find -lSDL_mixer"

the sdl mixer is there as it doesnt complain about the code however it won't compile thus running.

Almost got this now i think :p

Linking executable: sdlapp.exe
f:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.4\..\..\..\..\mingw32\bin\ld.exe: cannot find -lSDL_mixer
collect2: ld returned 1 exit status
 
Last edited by a moderator:
Back
Top