I'm developing an application using the SDL libraries. Until now I have a code
that is working, I compiled and run it from Dev-C++ using "Compile and run"
button and everything is OK. But, when I run the application making double-
click on the icon, the program crashes saying that it couldn't find an image.
First I thought the working directory was different depending on where you run
your app so I wrote in the code 'system("dir")' to show the files in the
current directory. Then I executed again the app from Dev-C++ and making
double-click on it, system() returned the correct directory in both cases but
still, when I do double-click it cant open the images I use. Isn't that
weird?? If somebody has an idea why this is happening I would apreciated.
Thanks in advance!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When you run an application on Windows, if some dll is missing pops-up a a
window saying some xxx.dll is missing, so if you copy the file on the same
folder then the application runs ok when you run it making double-click.
The problem was that there were some .dll files that the program need to load
an image but the application doesn't tell you. So, copying the necessary .dll
files from the dev-cpp/bin folder to my project folder solved the problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm developing an application using the SDL libraries. Until now I have a code
that is working, I compiled and run it from Dev-C++ using "Compile and run"
button and everything is OK. But, when I run the application making double-
click on the icon, the program crashes saying that it couldn't find an image.
First I thought the working directory was different depending on where you run
your app so I wrote in the code 'system("dir")' to show the files in the
current directory. Then I executed again the app from Dev-C++ and making
double-click on it, system() returned the correct directory in both cases but
still, when I do double-click it cant open the images I use. Isn't that
weird?? If somebody has an idea why this is happening I would apreciated.
Thanks in advance!!
I will answer myself.
When you run an application on Windows, if some dll is missing pops-up a a
window saying some xxx.dll is missing, so if you copy the file on the same
folder then the application runs ok when you run it making double-click.
The problem was that there were some .dll files that the program need to load
an image but the application doesn't tell you. So, copying the necessary .dll
files from the dev-cpp/bin folder to my project folder solved the problem.