In every Netrinjo-program, a variable of a class derived from BasicApp has to be initialized. Otherwise Netrinjo-classes cannot be used.
Here an example (GameApp is here a class, derived from BasicApp):
int the_main( int argc, char *argv[] ); int main( int argc, char *argv[] ) { return the_main( argc, argv ); } #include "SDL/SDL.h"// "SDL.h" cannot be included before main, if compiling with mingw #include "gameapp.h"// header file which declares GameApp int the_main( int argc, char *argv[] ) { BasicApp::chDirToUser(); if( !BasicApp::setWorkingDir( "./.game-dir" ) ) return -1; GameApp app( argc, argv ); if( SDL_Init( 0 ) < 0 ) { app.logLine("ERROR: could not init SDL"); return -2; } atexit( SDL_Quit ); app.init();// ignore fail-status (so i.e. audio need not be captured) return app.mainLoop(); }