c++ - Change main method in Code::Blocks? -
i switched main winmain , code::blocks searching main. how fix this? stupid question can't find online.
update @jbl
#include <iostream> #include "def.h" //this defines few things #include <windows.h> #include <gl/gl.h> #include "glcontext.h" //this defines opengl/win32 functions using namespace std; bool winapi winmain(hinstance hinstance, hinstance hprevinstance, lpstr lpcmdline, int ncmdshow) { }
if add following microsoft linker options:
/subsystem:windows /entry:winmaincrtstartupnote not necessary gnu toolchain.
still microsoft tools can alternatively add main file:
.#ifdef _msc_ver .# pragma comment(linker, "/subsystem:windows /entry:winmaincrtstartup") .#endif
Comments
Post a Comment