首页 > 其他 > 详细

Release build does not work - error with Eigen library?

时间:2015-10-23 22:47:53      阅读:371      评论:0      收藏:0      [点我收藏+]

It can be available at http://stackoverflow.com/questions/23856967/release-build-does-not-work-error-with-eigen-library

 

When I build my program in debug mode, everything works fine. However, when I switch to release build, I get the following errors. It seems that there is a problem with Eigen. Could anyone please help?

1>------ Build started: Project: qtdemo, Configuration: Release Win32 ------
1>  moc_qtdemo.cpp
1>c:\users\documents\visual studio 2012\projects\qtdemo\qtdemo\generatedfiles\release\../../qtdemo.h(6): fatal error C1083: Cannot open include file: ‘Eigen/Dense‘: No such file or directory
1>  main.cpp
1>c:\users\documents\visual studio 2012\projects\qtdemo\qtdemo\qtdemo.h(6): fatal error C1083: Cannot open include file: ‘Eigen/Dense‘: No such file or directory
1>  qtdemo.cpp
1>c:\users\documents\visual studio 2012\projects\qtdemo\qtdemo\qtdemo.h(6): fatal error C1083: Cannot open include file: ‘Eigen/Dense‘: No such file or directory
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


The include directories need to be set for both debug and release mode. (And, more generally, for whichever configuration you support).

This is because you may want different settings for a specific configuration mode. For example, you‘d want to link to a debug library for a debug build, or turn optimizations on for a release build, and so on.

This can be done under Visual Studio through Project --> "name of project" properties --> VC++ directories, and selecting in the top bar the configuration you want to change the settings of.

Also note that setting can be changed for all the configurations at the same time by selecting "All configurations", like shown in the following picture: 技术分享

 

 

Release build does not work - error with Eigen library?

原文:http://www.cnblogs.com/Justry2015/p/4905818.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!