SDL - Lags like ****

Pages: 12
It's easiest to just use complete paths to your image files and not relative ones.

This is a terrible idea, as it requires the files always existing in a fixed directory. When giving the program to someone else, they either have to go through and change all the directories in the source, or they need to recreate the original directory tree (which may not be feasible if the original directory used a weird drive letter)
I dont know how to us that, wait a mo I have to go to the shop
@ Disch: OK, but on that note why would you distribute it without compiling the images into the binary? I was assuming that we weren't at the distribution stage yet.

EDIT: I should have mentioned that DURING DEVELOPMENT using complete paths makes one less thing you need to think about. I should have mentioned that you need to come back and address it when you distribute your package. So yes Disch is right.
Last edited on
@Devon I had to find this out myself, I figured it was because I didn't have the correct .dlls You need libpng15-15.dll and libjpeg-8.dll. You can find both in my project. ;)
Last edited on
I find it much easier to use relative paths rather than absolute paths - what is your idea of "relative ones"?
I put all those in system 32! what else am i missing?
Computergeek wrote:
OK, but on that note why would you distribute it without compiling the images into the binary?

Why would you ever compile images into an executable binary?

I mean it kind of makes sense for small icons or something... but for a game that's just nuts.
Last edited on
I deleted a troll post, then quoted He Man. It only seems random because the troll post is gone now.
@ Disch: Now that I think about it, I can see what you mean. I just thought it would simplify things for the end user and one way or another the image would take up roughly the same amount of space on the disk. But putting them into the binary would mean you can't unload images you aren't using.

As for why you would ever do it? Because you can, and at least a dozen programs that I use everyday do. I guess I just thought it was a common enough practice.
Do you have correct paths? Put all the SDL dlls in the program directory, see if that helps.
no change fredbill :/
@ devonrevenge: Please copy paste the error that you are getting.

@ Fredbill30: If the issue was with the application trying to find the DLL files then the OS would notify you when it tries to load them. You wouldn't even make it to the function call.
obj\Debug\main.o: In function `Z10load_imageSs':
C:/Documents and Settings/devonrevenge/
My Documents/My Music/sdlproject#1.2/main.cpp:18: undefined reference to `IMG_Load'
collect2.exe: error: ld returned 1 exit status

Last edited on
Didn't link SDL_image properly.
how I link wrong :/ I wonder?
Are you using VC++ 2010?
no i am using bode clocks
DOH, I was using the 64 bit lib not the 84!
desk << face;
Topic archived. No new replies allowed.
Pages: 12