It sounds very much like you don’t have the currently directory included in
your path (this is actually a Good Thing!).
When you run your app from the terminal do you run it like this,
./myapp
Or like this,
Myapp
…? If the latter does not work then you don’t have the current directory in
your path (again - it’s best you don’t because it can cause problems! So I’m
told anyway…)
If you want your app to work from a double click, then you’ll have to give
the absolute path to your data when you are loading it (this is probably why
it’s quiting - because it cannot load data and you’ve told it to quit. Or
it’s seg faulting).
When I develop my games I run them from the terminal with ./blobwars. When
I’m finally read to have these installed to places like
/usr/share/games/parallelrealities/ then I alter the code accordingly (well,
actually I simply change a #define to another value so it compiles
differently).
To get what you want will take a little work on your part, but it’ll teach
you a few bits and pieces about how many *nix systems are set up.
Sorry if that all sounds complicated… Don’t worry, I ran into the same
problem as you when I started off with Linux and KDE.
Cheers,
Stevie :)> ----- Original Message -----
From: Matt Wilson [mailto:matt@mattsscripts.co.uk]
Sent: Monday, February 02, 2004 11:19 AM
To: sdl at libsdl.org
Subject: Re: [SDL] Kdevelop Woes
On Mon, 2004-02-02 at 06:52, MC wrote:
Hey all,
I’m writing my SDL app in Kdevelop. I have everything set up right and
it runs perfectly. But it requires the Terminal to run!
Everytime I double-click the binary the program boots and quits. If I
run it from a command line it works fine.
Weird. The only thing I can think of is that perhaps when double-clicking on
it (shudder) the working directory isn’t being correctly set and so .’.
your app can’t find any of it’s data files … where as running it from the
terminal ensures a correct working directory(?).
–
http://www.mattsscripts.co.uk/
- A great source for free CGI and stuff
When the President does it, that means it is not illegal.
– Richard Nixon
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
This message is intended only for the personal and confidential use of the
designated recipient(s) named above. If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited. This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers. Email transmission cannot be guaranteed to be
secure or error-free. Therefore, we do not represent that this information is
complete or accurate and it should not be relied upon as such. All
information is subject to change without notice.