Hi everybody,
I hope it’s the best way to ask for answers about SDL, I’ve searched for
about a day now, but without any results.
I currently have a problem using SDL library to make a program running on
Windows. I developed a program in a Linux environment using gcc 4.3 and it
worked fine. I now want to migrate it in a Windows environment. I first
installed Eclipse (the same IDE I’m using under Linux) and then I installed
MinGW to compile my program (C:\MinGW\bin\mingw32-make).
I installed the headers and the SDL.dll library. I used CMake to create my
Makefile and I have made sure that every libraries I need are linked
correctly, i.e.:
mingw32
SDLmain
SDL
I had the WinMain() problem, but it is now solved, my program compiles like
a charm, but it can’t run, nothing happens, even though the SDL.dll is in
the directory in which the .exe is.
So I created a small project to see where the problem was:
That runs fine:
#include
using namespace std;
int main(int argc, char *argv[]){
cout << "Here I am... in a windows environment" << endl;
cout << "End of Windows program" << endl;
return 0;
}
That doesn’t run, but compiles like a charm:
#include
#include “SDL/SDL.h”
using namespace std;
int main(int argc, char *argv[]){
cout << "Here I am... in a windows environment" << endl; cout << "End of Windows program" << endl; return 0;
}
It seems, one way or another, the #include “SDL/SDL.h” is messing somewhere,
but I really don’t know what is the problem. Of course, I can’t really go on
with my primary project until I have solved this.
I surely must have missed something, please, don’t be too hard, I’m new at
compiling on Windows and tools like MinGW are new to me.
Thank you for your help,
J?r?me