http://discuss.visual-prolog.com/viewtopic.php?t=6392
I am adding my own bindings to the FANN DLL library and come across the old problem of how to put debug statements in the DLL runtime that would actually print somewhere meaningful.
So far this is what I have manged to do.
In the DLL code which I am compiling as 'C' code in VS2008 I have placed the following code
Code: Select all
BOOL Fred= AllocConsole();
freopen("CONIN$","r",stdin);
freopen("CONOUT$","w",stdout);
freopen("CONOUT$","w",stderr);
Statement like fprintf(stderr,"Error No. %d\n",errno); now produce output to an extra console screen that appears as well as your GUI interface from the FANNTest.exe that I am using to test interface to FANN. Still having floating point issues but at least I can now put debug statements anywhere I want and have them printout to the Console window.
There is no question here. This is just info for any who need it.