Hey Jason,
int main(int argc, char* argv[])
{
if( argc >= 2 && strcmp( argv[1], "-h" ) == 0 ){
std::cout << "usage: TuioDump [port]\n";
return 0;
}
int port = 3333;
if( argc >= 2 ) port = atoi( argv[1] );
std::cout << "listening to TUIO messages at port " << port << std::endl;
TuioDump dump;
TuioClient client(port);
client.addTuioListener(&dump);
client.start(true);
return 0;
}
That is the C++ code that runs the console application.
I included the #include "DarkGDK.h" and got no errors.
Now after the #include statements, I put in a bool firstrun = 0; so I could setup the first 2 objects in my window.
Now here is the first error I get when I try to compile:
First-chance exception at 0x00000000 in TuioDump.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x00000000 in TuioDump.exe: 0xC0000005: Access violation reading location 0x00000000.
And that's with the "dbMakeObjectCube(1, 15);" statement - so that's it in a nutshell.
If I comment out the dbMakeObject statements, everything is great, I know my function has been called because the stdout statement inside the if (!firstrun) gets output to the screen.
I know that with the bool being global, I can call DarkGDK and not go through the initialization all over again, but the requirements of LoopGDK seem to be the ESC key, if I'm not understanding that, someone please clarify.
why doesn't it work the way I want it to!