MegaGlest Forum
Archives (read only) => Vanilla Glest => Bug report => Topic started by: daniel.santos on 22 February 2008, 04:44:33
-
a segfault is created very shortly after startup. This is caused because the new command line code removes some SDL initialization that is needed (formerly in shared_lib/include/platform/sdl/platform_main.h). I hacked mine to get it running on Linux temporarily:
int main(int argc, char** argv){
if (SDL_Init(SDL_INIT_EVERYTHING) < 0) {
std::cerr << "Couldn't initialize SDL: " << SDL_GetError() << "\n";
return 1;
}
SDL_EnableUNICODE(1);
int result = Glest::Game::glestMain(argc, argv);
SDL_Quit();
return result;
}
Maybe we can stick the platform_main.h's back in and just modify them to pass on the argc and argv.
-
I will fix it ASAP.
-
Should be fixed now.
-
Thank you Martiño. Mine is working because I have glest_game/main.cpp modified, but this may still be broken in subversion since the new main function doesn't call the macro. So it should compile on windows still, but will still crash in Linux since it's not using the MAIN_FUNCTION macro:
int main(int argc, char** argv){
return Glest::Game::glestMain(argc, argv);
}instead of:MAIN_FUNCTION(Glest::Game::glestMain)
Thanks again.
-
I forgot to check main.cpp in, it is done now.