Hi! I'm a newbie in gosu programming, and i'm trying to run a program on it over C++ (i think it's even less than a Hello World :p), but i get an error. I hope you could help me. This is my code:
#include <Gosu/Gosu.hpp>
int main(int argc, char* argv[]) { Gosu::Window(640,480,1); }
I know, it's an stupid game. Anyway, i always get the same error:
X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 1 (X_CreateWindow) Serial number of failed request: 138 Current serial number in output stream: 139 Press ENTER to continue.
The numbers in lines 3 and 4 change in every execution. I have run this over Ubuntu 9.04, and I used Code::Blocks IDE. Everything is correctly linked and compiled, but I can't avoid this failure in runtime. The error is given when creating the window, all the remaining parts of the code are OK (obviously...)
I get the same error again. I have traced the program, and the error is given in the line:
Gosu::Window win(640,480,0);
, so I think it's a less trivial error. Could it be a trouble with hardware or update packets of other libraries? I'm sorry, I'm new on Gosu and I feel a little lost. Do you recommend me to change into Ruby? Thank you!
You don't need a variable name to test if the constructor is working, and you don't need to return anything in main() thanks to a special language rule :)
Does it work in windowed mode, i.e. when passing false instead of 1? If so, does it work in windowed mode when the resolution is the desktop resolution?
By ?
Date 2009-08-04 11:04
Hi there. I've tried to run the CppTutorial, and I get the same error. Changing resolution or fullscreen mode don't work either. Could I have installed something wrong? Thank you!