Hello everybody!
I’ll use my first post to introduce myself briefly: my name is Massimiliano, I come from Italy and I’m on my first year of university.
I don’t want to abuse your patience, so I’ll go straight to my problem!
I wrote an application that I need to use in a project for the Statistics course at university.
The program is written in C and uses SDL and SDL_ttf.
Usually I run Linux Ubuntu 10.04 with arch amd64. Compiling on this system using
gcc -g -Wall -Wextra -pedantic -Werror -std=gnu99 -O0 $(FLIST) -lSDL -lSDL_ttf
where FLIST is the list of source files I wrote, gives no problems and works fine.
However, I wanted to cross-compile in order to run it on Windows 32-bit and distribute it [mainly, to gather more data for the project], so I made various [a big lot of] tries and the best I could get was to install mingw32 from repositories, downloading SDL.dll, SDL_ttf.dll, zlib1.dll and freetype-6.dll from SDL and SDL_ttf web pages and putting them in the compiling folder, adding #undef main() before the main() in the main source code and compiling with
i586-mingw32msvc-gcc -m32 -I/usr -L./ -lSDL -lSDL_ttf $(FLIST) -lSDL -lSDL_ttf
All other tries failed, this is the first one that compiles and links [other tries compiled but failed linking SDL_ttf].
Now the point is:
- did I make it right so far or was it all a big mess?
- I put the whole folder [including dlls] on windows and tried to run the app, but the only thing I get is that a command prompt opens and nothing else happens.
What should I do to make it run on windows?
I tried using -mwindows flag but in that case I run the app and it doesn’t even open the command prompt, simply nothing happens.
Thanks in advance for any help