[mlpack-svn] [MLPACK] #218: Error C3861: 'usleep': identifier not found. under win32
MLPACK Trac
trac at coffeetalk-1.cc.gatech.edu
Sun Mar 25 13:44:19 EDT 2012
#218: Error C3861: 'usleep': identifier not found. under win32
----------------------+-----------------------------------------------------
Reporter: zy26 | Owner:
Type: defect | Status: new
Priority: blocker | Milestone: mlpack 1.0.2
Component: mlpack | Resolution:
Keywords: | Blocking:
Blocked By: |
----------------------+-----------------------------------------------------
Description changed by zy26:
Old description:
> For cli_test.cpp, we need usleep on win32.
>
> See http://filipivianna.blogspot.com/2010/07/usleep-on-windows-win32.html
> {{{
> error C3861: 'usleep': identifier not found
> mlpack\src\mlpack\tests\cli_test.cpp 212 1 mlpack_test
> }}}
New description:
For cli_test.cpp, we need usleep on win32.
See http://filipivianna.blogspot.com/2010/07/usleep-on-windows-win32.html
{{{
error C3861: 'usleep': identifier not found
mlpack\src\mlpack\tests\cli_test.cpp 212 1 mlpack_test
}}}
An ugly fix is add those code to line 12 of cli_test.cpp
{{{
#else
#include<windows.h>
void usleep(int waitTime){
__int64 time1 = 0, time2 = 0, sysFreq = 0;
QueryPerformanceCounter((LARGE_INTEGER *)&time1);
QueryPerformanceFrequency((LARGE_INTEGER *)&sysFreq);
do{
QueryPerformanceCounter((LARGE_INTEGER *)&time2);
}while( (time2-time1) <waitTime);
}
}}}
--
--
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/218#comment:1>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed by the FASTLAB at Georgia Tech under Dr. Alex Gray.
More information about the mlpack-svn
mailing list