User forums > Help
SDL OpenGL Set up in windows
(1/1)
slanker70:
First of all this is my first ever post in the forums so hi all,
I'm trying to develop a cross platform game engine with OpenGL and SDL using code::blocks as the IDE.
At the moment I'm having difficulties setting it up in windows, the only tutorials that actually work when I tried it was the one from NeHe
http://nehe.gamedev.net/wiki/(S(hop05t45mflkcmeouxiojbra))/Default.aspx?Page=LessonCodeBlocksWin&AspxAutoDetectCookieSupport=1
But it doesn't explain how to set it up from scratch (it uses a pre-build code::blocks project) or using the new project->SDL application wizard.
I also couldn't find any tutorial on how to set it up in OS X(SDL OpenGL).
Finally I tried to port my existing project from Visual Studio to code::blocks in Linux but kept getting this error message
--- Quote ---error: ‘<anonymous>’ has incomplete type
error: invalid use of ‘GLvoid’
--- End quote ---
It seems that for some reason the code::blocks doesn't allowed specifying GLvoid in the functions parameter
--- Code: ---// This class handles SDL and OpenGL initialisation
class EngineCore
{
public:
// Class constructor and destructor
EngineCore(GLvoid); <----------------------------- like this for example
~EngineCore(GLvoid);
public:
// Class member function
// Initialise EngineCore
GLvoid initialise(GLsizei in_width, GLsizei in_height);
// Initialise SDL
GLvoid initSDL(GLvoid);
// Initialise SDL window
GLvoid intitSDLwindow(GLvoid);
// Initialise OpenGL
GLvoid initGL(GLvoid);
// Set up OpenGL view port for 3D viewing since the default view in OpenGL is an orthographic view
GLvoid set3DView(GLvoid);
private:
// Class data memebers
GLsizei width, height;
};
--- End code ---
Is this a standard thing in code::blocks
Please help me solved this issues.
Many thanks,
Perdana Putra
stahta01:
Code::Blocks is an IDE.
It is NOT an compiler.
The compiler you are using is raising the error!!
Tim S
slanker70:
Hi Tim,
I do know that code::blocks is not a compiler rather an IDE, and I did mention it in my first post!!
--- Quote ---I'm trying to develop a cross platform game engine with OpenGL and SDL using code::blocks as the IDE.
--- End quote ---
I'm merely asking whether anyone have a smiliar problem using code::blocks with GNU CC as the compiler. You got an answer for this problem?
Regards,
Perdana Putra
stahta01:
I suggest using an compiler known to compiler the code; or submitting bug reports to get the code to work.
GCC has trouble with anonymous namespaces. Not sure if it is just MinGW 4.x only.
Tim S
slanker70:
Hi Tim.
Many thanks for the reply, wil surely do that.
Any ideas on set up tutorials for windows and OS X though?
Regards,
Perdana Putra
Navigation
[0] Message Index
Go to full version