-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake vs2015编译报错 #283
Comments
benchmark.cpp 的windows实现似乎有些问题。timeval未定义,几个变量似乎应该用的tp但写的tv。用vs2015编译应该是想用model转换工具吧。把benchmark.cpp整个文件暂时注释掉其实就行了,我这么编译过了。完整的修改等作者修改吧。。。。。。。。 |
更新验证下... |
更新代码还是没有编译过 |
emmmm,还有问题... |
第二次... |
非常感谢@nihui,@egg532 。
我参照https://msdn.microsoft.com/en-us/library/windows/desktop/ms683614(v=vs.85).aspx 在benchmark.h 添加了 #include<Windows.h> ,编译通过。 不知道这是不是解决办法 |
将benchmark.cpp做如下修改可以编译通过 原来的 #include "benchmark.h"
#if NCNN_BENCHMARK
#include <stdio.h>
#include "layer/convolution.h"
#endif // NCNN_BENCHMARK
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <stdint.h> // portable: uint64_t MSVC: __int64
#else // _WIN32
#include <sys/time.h>
#endif // _WIN32 修改后 #ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <stdint.h> // portable: uint64_t MSVC: __int64
#else // _WIN32
#include <sys/time.h>
#endif // _WIN32
#include "benchmark.h"
#if NCNN_BENCHMARK
#include <stdio.h>
#include "layer/convolution.h"
#endif // NCNN_BENCHMARK |
我验证了下,和 File:mat.h
|
fixed in 3977d32 |
编译通过,但是使用ncnn.lib的过程中还是报相同的错误! |
我参照https://github.com/Tencent/ncnn/wiki/cmake-VS2017-%E7%BC%96%E8%AF%91 用vs2015编译时,在nmake 命令后benchmark处出现错误,有人遇到吗?下面是错误代码:
The text was updated successfully, but these errors were encountered: