码迷,mamicode.com
首页 > 其他好文 > 详细

Release build does not work - error with Eigen library?

时间:2015-10-23 22:50:17      阅读:321      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!