Question about using SDL in Linux
Hi! I''m trying to display a bitmap in a window created using SDL...but whenever I run the app, an error message pops up stating that it "Couldn''t find the Program -----", where ---- is the name of my proggy.
The code causing the problem is this:
image = SDL_LoadBMP("picture.bmp");
if(image == NULL) {
printf("Unable to load image.\n");
return 1;
}
The image is in the project directory, but that strange error still pops up...any ideas?
-- I''m using emacs & gcc to write and compile, btw --
Zoinks!
hi,
are you launching your program only by typing "name_of_your_program" or "./name_of_your_program" ?
the first one would work only if the "." directory is in your path, and it isn''t by default on most distributions ...
--
flure
are you launching your program only by typing "name_of_your_program" or "./name_of_your_program" ?
the first one would work only if the "." directory is in your path, and it isn''t by default on most distributions ...
--
flure
--flurehttp://flure.free.fr
then again,
thats one WEIRD shell he''s using if thats the problem...
what shell gives errors like that?
thats one WEIRD shell he''s using if thats the problem...
what shell gives errors like that?
Thanks for the replies!
I''m using the SuSE Linux distro 8.0 w/kde 3.0
I hope that answers your question (i''m still a bit new to linux)
^_^
I''m using the SuSE Linux distro 8.0 w/kde 3.0
I hope that answers your question (i''m still a bit new to linux)
^_^
Zoinks!
quote: Original post by C-Junkie
then again,
thats one WEIRD shell he''s using if thats the problem...
what shell gives errors like that?
All of them since it''s not related to the shell. It''s a PATH issue..
"DaHjajmajQa''jajHeghmeH!"
Cyberdrek
danielc@iquebec.com
Founder
Laval Linux
/(bb|[^b]{2})/ that is the Question -- ThinkGeek.com
Hash Bang Slash bin Slash Bash -- #!/bin/bash
[Cyberdrek | ]
quote: Original post by SCSI2
Thanks for the replies!
I''m using the SuSE Linux distro 8.0 w/kde 3.0
I hope that answers your question (i''m still a bit new to linux)
Unfortunately, it doesn''t.
Have you properly configured your SDL environment? Does sdl-conf (or whatever that header and library path thingie is called) return appropriate information? Have you properly built the binary (and is it listed in the specified directory)?
If yes to all of the above, is "." part of your path, as Cyberdrek and flure mentioned? UNIX shells only look for executables along the path. If it isn''t, you will need to indicate to your shell that you wish to locate the executable locally by prepending the filename with "./". Alternatively, you could navigate to the directory using Konqueror and double click on the file icon.
Let us know what progress, if any, you''ve made.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement