yajiedesign / mxnet

efficient, flexible, distributed deep learning framework
Apache License 2.0
177 stars 45 forks source link

Build Error: stdint.h #3

Closed thesby closed 7 years ago

thesby commented 7 years ago

running build
running build_py
running build_ext
building 'mxnet/_cy2/.ndarray' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\mxnet
creating build\temp.win-amd64-2.7\Release\mxnet\cython
C:\Users\Ryan\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I../include/ -I../nnvm/include "-ID:\Program Files\Anaconda2\include" "-ID:\Program Files\Anaconda2\PC" /Tpmxnet/cython/ndarray.cpp /Fobuild\temp.win-amd64-2.7\Release\mxnet/cython/ndarray.obj
ndarray.cpp
C:\Users\Ryan\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
../include/mxnet/c_api.h(21) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
error: command 'C:\\Users\\Ryan\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2```
yajiedesign commented 7 years ago

the vc9.0 not include "stdint.h", copy it from the high version or download it from the Internet.

thesby commented 7 years ago

Yes, thank you. I just use

#ifdef _MSC_VER  
typedef __int32 int32_t; 
typedef unsigned __int32 uint32_t; 
typedef __int64 int64_t; 
typedef unsigned __int64 uint64_t;  
#else 
#include <stdint.h> 
#endif 

to replace the #include<stdint.h> and use

#define bool int
#define true 1
#define false 0

to replace the #include<stdbool.h>. The problem is solved.