Skip to content

Commit

Permalink
Making main.cc compilable with g++
Browse files Browse the repository at this point in the history
  • Loading branch information
hauke68 committed Jul 4, 2012
1 parent 6dab159 commit d810bda
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions src/main.cc
@@ -1,22 +1,35 @@
#include "main.h"
#include <ClanLib/application.h>
#include <ClanLib/core.h>
#include <ClanLib/display.h>
#include <ClanLib/gl.h>
#include <ClanLib/gui.h>

#include <vector>

using namespace std;

class Main {

public:

// Implementation of class Main
#ifdef WINDOWS
static int Main::WinMain(const vector<CL_String> &args) {
static int WinMain(const vector<CL_String> &args) {
#else
static int Main::main(const vector<CL_String> &args) {
static int main(const vector<CL_String> &args) {
#endif

// Setup ClanLib modules
CL_SetupCore setup_core;
CL_SetupDisplay setup_display;
CL_SetupGL setup_gl;
CL_SetupGUI setup_gui;
// Setup ClanLib modules
CL_SetupCore setup_core;
CL_SetupDisplay setup_display;
CL_SetupGL setup_gl;
CL_SetupGUI setup_gui;

// Start the game here
// Start the game here

return 0;
}
return 0;
}
};

#ifdef WINDOWS
CL_ClanApplication app(&Main::WinMain);
Expand Down

0 comments on commit d810bda

Please sign in to comment.