I Beg For Help! I Need To Compile Sdl Paeryn On Devcpp (windows)


jimmyslam

Member
Joined
May 30, 2006
Messages
268
Location
Brighton
Website
Visit site
Hi , I am triying to compile my game using paeryn SDL from windows and DevCPP and I am going crazy, seriously. I have been triying for hours and I cant make it work. :eek:

Does anyone knows how to do it ? :huh: ? PLEASE PLEASE PLEASE PLEASE PLEASE?!?! :(

I am in the middle of my game I need more juice, i am using not many tiles and this is slowing down to 18 FPS and I havent started with the sound yet..... that means I really need HW acceleration or I wont be able to finish my game :( :( :(

Dont send me to linux cause i need windows and I am used to a good GUI, if u know a good GUI to develop and compile for Linux.... I guess i would need to install it But I want to avoid it until is no other way.... :(

PLEASE I BEG FOR HELP!
 
You seemed to have missed a post with the title "
Ubuntu Development Ide" and the comment "Finding an IDE for gp2x development in linux" :) No problem, go for Code::Blocks. I loves dev-cpp and many people think code::blocks and dev-c++ are equivalents.

However, your probably like me hoping nobody says that, because your too lazy. I know I am. Anyways, try the following:

Create a new project (Static library) and set all of the parameters (Like names, any other stuff to make it easier/more comfortable.) in the same directory as the library source. Add all of the files to the project that are source files (Often .c, .cc, .cpp, .h, and .hh) and build. If you get linker errors, try to make a logical decision on what library is missing, goto project options, and in the parameters you can add a new line to linker options. Try adding -lname as in -ljpeg for libjpeg (with the file libjpeg.a or some other extension)


Well, that was a waste of time. You wanted to compile WITH accelerated SDL. Try changing your setvideomode function from this:

SDL_SetVideoMode (320, 240, bitdepth, someflags);

to this

SDL_SetVideoMode (320, 240, bitdepth, someflags | SDL_HWSURFACE);

by adding | SDL_HWSURFACE to the parameters. Warning though, sometimes double buffering doesn't work and it flickers or its just plain not fast enough.

And calm down dude. Everyone here is willing to help you :) (Unless their spammers/flammers. The sunglass patch didn't work right.)
 
BTW, is there a point in having two dev forums, once beeing entitled "I need help", when messages like this one keeps beeing posted here ?
Considering the comparatively low traffic of these forums, why not merge them ?
 
Like I say, if you want me to program something , prepare the software for me before ;)

Is that hard to do something like that for those people that prepares their own toolchains? I have no idea how to do something like that , I only know programming. :blink:

Thanks to the GP2X devkit of GPH i am programming these days for GP2X :) , if not i probably would be playing or doing something else. I like programming, but I have all the shit that comes before... :huh:

Please somebody help... :eek: :eek:
 
Ok. Well, again, stay calm. The pros (In other words, people 100x better than me) have prepared a tool chain and you can set it up with Code::Blocks. But anyways, i told you exactly what you needed! You can do this in Dev-C++ without any modification if you add | SDL_HWSURFACE to the last parameter in SDL_SetVideoMode. Remove SDL_SWSURFACE if its there. If its empty, no need for a |, just SDL_HWSURFACE. If your a Linux-lover... the WiKi is your friend. http://wiki.gp2x.org/wiki/Setting_up_a_dev...ent_%28Linux%29

A GP2XDev toolchain builder leaves you with accelerated SDL. You'll probably want this one.

I can help you setup code::blocks if your gonna move to linux. Then you can compile gp2x programs with an IDE or use makefiles for those programs that you just want to compile immediately. A very flexible choice.
 
I tried using HWSurface with GPH SDL nad doesnt giveme compilation errors. But if I execute the game, everything flicks and looks awful.

I tried placing the lib folder of the paeryn SDL and replacing the files of the GPH SDL and when i try to compile i have this error a few times:

/gp2xsdk/Tools/lib/gcc/arm-gp2x-linux/3.4.6/libgcc.a(_divsi3.oS) uses hardware FP, whereas StarsDefender.gpe uses software FP
failed to merge target specific data of file /gp2xsdk/Tools/lib/gcc/arm-gp2x-linux/3.4.6/libgcc.a(_divsi3.oS)

And after that, I get more errors like this:
[Linker error] undefined reference to pthread_cond_signal@GLIBC_2.3.2'

What can i do now? (Remember I am useless in this area)
 
I didnt make it work.

IT start giving me a lots and lots of errors... It says stuff like couldnt find SDL.h....

Does anyone have on his hard drive? And can be so generous to send it to me?
 
JimmySlam posted on Dec 2 2006 at 04:24 PM said:
I tried using HWSurface with GPH SDL nad doesnt giveme compilation errors. But if I execute the game, everything flicks and looks awful.

You need to add this to your initialization flags: | SDL_DOUBLEBUF

So, you'd have this: SDL_HWSURFACE | SDL_DOUBLEBUF

This should get rid of the flickering.

And I'd advise you follow the previously mentioned link and use Code::Blocks with the hardware-accelerated SDL libs:
http://wiki.gp2x.org/wiki/Using_CodeBlocks

I'm pretty sure I left out the soft-float libraries mentioned, but I can't remember now. One thing not mentioned that caused me trouble, is the toolchain should be installed on the C: drive. I usually use my D: drive for everything, but it took me an hour or more to discover things are hard-linked for C:. You can still keep your development folders on other drives.

Remember, if you want the maximum speed, you need to not only have your screen set to SDL_HWSURFACE, but all your surfaces that get blitted need to also be set the same. This means creating surfaces using SDL_CreateRGBSurface with that same flag. You also need to call SDL_DisplayFormat on the surfaces to convert them to the same format before doing blits with them (I'm pretty sure that function doesn't bother converting normal surfaces to HWSURFACEs, so both are necessary if you are, say, creating surfaces from BMPs using SDL_LoadBMP.. you'd need to first use SDL_LoadBMP, then blit the surface to your other new surface that has the HWSURFACE flag, then destroy the surface LoadBMP created.)

If I'm wrong, someone else feel free to correct me, I'm a bit new to SDL, too.
 
Last edited by a moderator:
Ok If I add that , I get:
Code:
screen = SDL_SetVideoMode (SCREEN_SIZE_X, SCREEN_SIZE_Y, 16, SDL_SWSURFACE | SDL_DOUBLEBUF);


And .. ERROR!:

Fatal signal: Segmentation Fault (SDL Parachute Deployed)
Segmentation fault



About the C:/

I have been programming with SDL on DEVCPP for a few months.

I shouldnt have to do it on C. Like you I dont use C for this kind of things And i really dont want to do it because I dont have space on C and that is stupid... isnt it? :(
 
JimmySlam posted on Dec 2 2006 at 07:15 PM said:
Ok If I add that , I get:

Fatal signal: Segmentation Fault (SDL Parachute Deployed)
Segmentation fault

That could be caused by a lot of things, but don't bother trying to use double buffering using GPH's libraries, they're not accelerated. Get a proper accelerated toolchain set up first if you haven't yet.


JimmySlam posted on Dec 2 2006 at 07:15 PM said:
About the C:/

I have been programming with SDL on DEVCPP for a few months.

I shouldnt have to do it on C. Like you I dont use C for this kind of things And i really dont want to do it because I dont have space on C and that is stupid... isnt it? :(

Sometimes life sucks.
 
Last edited by a moderator:
Senor Quack posted on Dec 2 2006 at 07:19 PM said:
JimmySlam posted on Dec 2 2006 at 07:15 PM said:
Ok If I add that , I get:

Fatal signal: Segmentation Fault (SDL Parachute Deployed)
Segmentation fault

That could be caused by a lot of things, but don't bother trying to use double buffering using GPH's libraries, they're not accelerated. Get a proper accelerated toolchain set up first if you haven't yet.

I have one and i dont know how to use it... and I want one with a proper gui... or at least easy to compile things with.


And if GPH SDL are not accelerated i will not bother. I will carry on programming, ever if that goes slow. And on the future I will meet friends and will help me to set up everything... this is ridiculous, i cant keep wondering arround when i have a lot of code to programm. :(
 
Last edited by a moderator:
You don't need to build your own toolchain like someone mentioned, the hard work's been done for you.. yes, it could be easier, and someday it will be. There's a link posted here already, about setting up codeblocks with SDL. It contains a link to a pre-compiled SDL library/headers archive. You extract that to C:\, install the latest codeblocks (not the stable release, the devlopment version, as it contains the most features), and configure it per that wiki article.

I'm not too good at setting up toolchains, either, but you need to put a bit of effort into things, I gotta run but we can help you get a toolchain up and running within 24 hours. Just don't go jump off a bridge or anything.
 
Senor Quack posted on Dec 2 2006 at 07:31 PM said:
You don't need to build your own toolchain like someone mentioned, the hard work's been done for you.. yes, it could be easier, and someday it will be. There's a link posted here already, about setting up codeblocks with SDL. It contains a link to a pre-compiled SDL library/headers archive. You extract that to C:\, install the latest codeblocks (not the stable release, the devlopment version, as it contains the most features), and configure it per that wiki article.

I'm not too good at setting up toolchains, either, but you need to put a bit of effort into things, I gotta run but we can help you get a toolchain up and running within 24 hours. Just don't go jump off a bridge or anything.


Ok lets do it soon, but not today i had 2 terrible days triying... I want to code some before i hate it...
 
Last edited by a moderator:
screen = SDL_SetVideoMode (SCREEN_SIZE_X, SCREEN_SIZE_Y, 16, SDL_SWSURFACE | SDL_DOUBLEBUF);

Should be:
screen = SDL_SetVideoMode (SCREEN_SIZE_X, SCREEN_SIZE_Y, 16, SDL_HWSURFACE | SDL_DOUBLEBUF);
 
Back
Top