首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法编译CGAL示例Triangulation_2

无法编译CGAL示例Triangulation_2
EN

Stack Overflow用户
提问于 2019-12-12 00:32:44
回答 1查看 338关注 0票数 0

我已经在vcpkg中安装了CGAL。还安装了带有vcpgkQt5。然后我下载了CGAL-5.0-examples并运行了cmake-gui ..。它做到了,没有错误。Qt5变量似乎指向vcpkg中的某些位置。不幸的是,在生成sln之后,我正在打开它,我不能构建它:

代码语言:javascript
复制
Severity    Code    Description Project File    Line    Suppression State   Suppression State
Error   LNK1104 cannot open file 'Debug\CGAL_Qt5_moc_and_resources.lib' for_loop_2  D:\dev\CGAL-5.0\examples\Triangulation_2\build\LINK 1       
Error   C1083   Cannot open source file: 'D:\dev\CGAL-5.0\examples\Triangulation_2\build\qrc_CGAL.cpp': No such file or directory   CGAL_Qt5_moc_and_resources  D:\dev\CGAL-5.0\examples\Triangulation_2\build\c1xx 1       
Error   C1083   Cannot open source file: 'D:\dev\CGAL-5.0\examples\Triangulation_2\build\qrc_Input.cpp': No such file or directory  CGAL_Qt5_moc_and_resources  D:\dev\CGAL-5.0\examples\Triangulation_2\build\c1xx 1       
Error   C1083   Cannot open source file: 'D:\dev\CGAL-5.0\examples\Triangulation_2\build\qrc_File.cpp': No such file or directory   CGAL_Qt5_moc_and_resources  D:\dev\CGAL-5.0\examples\Triangulation_2\build\c1xx 1       
Error   C1083   Cannot open source file: 'D:\dev\CGAL-5.0\examples\Triangulation_2\build\qrc_Triangulation_2.cpp': No such file or directory    CGAL_Qt5_moc_and_resources  D:\dev\CGAL-5.0\examples\Triangulation_2\build\c1xx 1   

为什么它试图从构建目录打开cpp文件,尽管源代码目录是上一级目录?

EN

回答 1

Stack Overflow用户

发布于 2019-12-12 16:52:30

对于使用CGAL:vcpkg install cgal[qt]的示例,您需要安装cgalqt,它包含CGAL使用的大多数3D示例和演示的特定标头。

此外,将vcpkg与cmake一起使用也有其特殊性,因为在cmake中,Optional Platform的默认行为是x64,而在vcpkg中,默认行为是x86。这意味着如果你把它留空,来自vcpkg外部的所有东西都是x64的,vcpkg x86里面的所有东西都是x64的,你会遇到警告,链接错误,可能还会有一些构建错误。This page解释了使用vcpg配置和构建CGAL示例的步骤。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59290221

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档