Howdy. Here’s the deal. I’m using Mingw, v.2.0.0-3, and all the latest
necessities, MSYS… the whole nine yards I think. Used it to build SDL
from source.
I use jGRASP for an IDE, and it works fine for normal C++ console and
windows development with mingw.
I tried typing out Example 1-1 in the SDL Guide, but I replaced all the
hard to read printf()‘s with my stylin’ cout statements. Nothin’ special,
I just like iostream more that stdio - C++ is my first language after all,
been playing around with it for years, thought I’d try to get the latest
Mingw and see what I could do with it.
The program compiled without a hitch, but when it’s run, there’s no output
at all! Not even the cout before SDL_Init().
Here’s my code:
#include
#include <SDL/SDL.H>
using namespace std;
int main (int argc, char* argv[]) {
cout << "Initializing SDL" << endl;
// Init sound and video output
if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO) == -1) {
cout << "SDL Fuxored: " << SDL_GetError();
return -1;
}
cout << "SDL Good To Go!" << endl
<< "SDL Shuting down." << endl;
//Shutdown All sybsystems
SDL_Quit();
cout << "SDL Shut Down. Bye!" << endl;
return 0;
}
and the gcc invocation:
g++ E:\Projects\My Demo\demo.cpp -IE:\Mingw\MSYS\1.0\local\include
-Dmain=SDL_main -LE:\Mingw\MSYS\1.0\local\lib -lmingw32 -lSDLmain -lSDL
-mwindows
So, can anyone help me out? I want to know why my computer isn’t talking
back. Compiler problem? Windows problem? C++ Library problem? SDL
Incompatibility problem?
Thanks for any help in advance,
Bro–
"When the Going gets Weird, the Weird turn Pro"
Hunter S. Thompson
"As below, so above and beyond I imagine,
Drawn outside the line of reason.
Push the envelope. Watch it bend."
Tool - Lateralus