Skip to content
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

Fix windows build fails #321

Merged
merged 2 commits into from
Mar 30, 2018
Merged

Fix windows build fails #321

merged 2 commits into from
Mar 30, 2018

Conversation

tcye
Copy link
Contributor

@tcye tcye commented Mar 30, 2018

ncnn在windows编译时会出现几个错误:

  1. benchmark.cpp中包含了mat.h, mat.h包含了string.h, 在windows下,windows.h必须包含在string.h前,否则会出现错误:"InterlockedIncrement”: 找不到标识符", 解决方案是在benchmark.cpp中优先包含windows.h,虽然不太符合up主的编码规范(先包含自身的头文件foo.h),但至少能解决windows下的编译问题
  2. windows下不支持 #pragma omp parallel for collapse(2) ,这里用一个宏判断规避了
  3. 优化了caffe等tools编译的问题, 不再直接抛出error,而是给出一个警告,对于我这样的只使用mxnet,并不关心caffe tool编译的同学会比较方便,否则每次编译都要手动注释掉cmake tools

@nihui nihui merged commit 3977d32 into Tencent:master Mar 30, 2018
@tcye tcye deleted the fix_win branch March 30, 2018 12:53
ghimiredhikura pushed a commit to ghimiredhikura/NCNNSFD that referenced this pull request Jul 26, 2020
* fix windows build error

* remove wrong commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants