在 CGAL 中运行程序"Hello World"



我在Visual 2012 32位的CGAL中安装时遇到错误。

我安装了Boost和Cmake,也成功地配置和生成了CGAL项目。

我在发布和调试中重建ALL_BUILD,CGAL,演示,示例..项目,除了安装项目外,所有项目都成功了我重建安装项目在这里遇到问题:

Error 102 error MSB3073: The command "setlocal "C:Program FilesCMakebincmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake if %errorlevel% neq 0 goto :cmEnd:cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone :cmErrorLevel exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd :VCEnd" exited with code 1. C:Program FilesMSBuildMicrosoft.Cppv4.0V110Microsoft.CppCommon.targets 134 5 INSTALL 然后,我将"Hello World"复制到.cpp文件中 CGAL 项目,重建成功。我很兴奋,但是当我按本地窗口调试时,它说:无法启动程序"C:(项目名称)\bin\发布\CGAL-vc-mt-4.5.dll"

在这里,CMake说:

The CXX compiler identification is MSVC 17.0.50727.1
The C compiler identification is MSVC 17.0.50727.1
Check for working CXX compiler using: Visual Studio 11 2012
Check for working CXX compiler using: Visual Studio 11 2012 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working C compiler using: Visual Studio 11 2012
Check for working C compiler using: Visual Studio 11 2012 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
== Setting paths ==
Build CGAL from release in directory CGAL-4.5
Packagenames: CGAL-4.5
== Setting paths (DONE) ==
== Generate version files ==
CGAL_MAJOR_VERSION=4
CGAL_MINOR_VERSION=5
CGAL_BUGFIX_VERSION=0
CGAL_SONAME_VERSION=10
CGAL_SOVERSION     =10.0.4
CGAL_REFERENCE_CACHE_DIR=
Building shared libraries
Targetting Visual Studio 11 2012
Target build enviroment supports auto-linking
Using VC11 compiler.
Generator uses intermediate configuration directory: $(Configuration)
USING CMake version: 3.1.0
System: Windows
CMake Warning (dev) at CMakeLists.txt:437 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
details.  Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW.  Since the policy is not set the OLD behavior will be used.
This warning is for project developers.  Use -Wno-dev to suppress it.
== Generate version files (DONE) ==
== Set up flags ==
Build type: Release
USING CXXFLAGS = ' /DWIN32 /D_WINDOWS /W3 /GR /EHsc -D_CRT_SECURE_NO_DEPRECATE -    D_SCL_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS /fp:strict /fp:except- /wd4503 /bigobj /MD /O2 /Ob2 /D NDEBUG'
USING LDFLAGS = ' /machine:X86 /INCREMENTAL:NO'
== Set up flags (DONE) ==
== Detect external libraries ==
External libraries supported:     GMP;MPFR;ZLIB;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;Eigen3;BLAS;LAPACK;QGLViewer;ESBTL;Coin3D;NTL;IPE
Preconfiguring library: GMP ...
Found GMP: C:/Program Files/CGAL-4.5/auxiliary/gmp/lib/libgmp-10.lib  
GMP has been preconfigured:
UseGMP-file:      
GMP include:      C:/Program Files/CGAL-4.5/auxiliary/gmp/include
GMP libraries:    C:/Program Files/CGAL-4.5/auxiliary/gmp/lib/libgmp-10.lib
GMP definitions:  
USING GMP_VERSION = '5.0.1'
Preconfiguring library: MPFR ...
Found MPFR: C:/Program Files/CGAL-4.5/auxiliary/gmp/lib/libmpfr-4.lib  
MPFR has been preconfigured:
UseMPFR-file:      
MPFR include:      C:/Program Files/CGAL-4.5/auxiliary/gmp/include
MPFR libraries:    C:/Program Files/CGAL-4.5/auxiliary/gmp/lib/libmpfr-4.lib
MPFR definitions:  
USING MPFR_VERSION = '3.0.0'
Boost version: 1.57.0
Found the following Boost libraries:
thread
system
Boost include:     C:/boost_1_57_0
Boost libraries:   optimized;C:/boost_1_57_0/stage/lib/boost_thread-vc110-mt-        1_57.lib;debug;C:/boost_1_57_0/stage/lib/boost_thread-vc110-mt-gd-1_57.lib;optimized;C:/boost_1_57_0/stage/lib/boost_system-vc110-mt-1_57.lib;debug;C:/boost_1_57_0/stage/lib/boost_system-vc110-mt-gd-1_57.lib

提升定义: 使用 BOOST_VERSION = '1.57.0' == 检测外部库(完成) ==

== Write compiler_config.h ==
Performing Test CGAL_CFG_BOOST_VARIANT_SWAP_BUG - Failed
Performing Test CGAL_CFG_DENORMALS_COMPILE_BUG - Success
Performing Test CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG - Success
Performing Test CGAL_CFG_IEEE_754_BUG - Success
Performing Test CGAL_CFG_ISTREAM_INT_BUG - Success
Performing Test CGAL_CFG_MATCHING_BUG_5 - Success
Performing Test CGAL_CFG_MATCHING_BUG_6 - Failed
Performing Test CGAL_CFG_MATCHING_BUG_7 - Failed
Performing Test CGAL_CFG_MATCHING_BUG_8 - Success
Performing Test CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG - Failed
Performing Test CGAL_CFG_NO_LIMITS - Success
Performing Test CGAL_CFG_NO_NEXTAFTER - Failed
Performing Test CGAL_CFG_NO_STL - Success
Performing Test CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG - Failed
Performing Test CGAL_CFG_NUMERIC_LIMITS_BUG - Success
Performing Test CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG - Success
Performing Test CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG - Success
Performing Test CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG - Success
Performing Test CGAL_CFG_USING_BASE_MEMBER_BUG_2 - Success
== Write compiler_config.h (DONE) ==
== Generating build files ==
Configuring libCGAL
Requested component: MPFR
Requested component: GMP
libCGAL is configured
Sources for CGAL component library 'CGAL_Core' detected
Configuring libCGAL_Core
Requested component: MPFR
Requested component: GMP
libCGAL_Core is configured
Sources for CGAL component library 'CGAL_ImageIO' detected
Configuring libCGAL_ImageIO
Found OpenGL: opengl32  
Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
OpenGL include:     
OpenGL libraries:   glu32;opengl32
Requested component: MPFR
Requested component: GMP
libCGAL_ImageIO is configured
NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.
Sources for CGAL component library 'CGAL_Qt3' detected
Configuring libCGAL_Qt3
libCGAL_Qt3 needs Qt3, cannot be configured.
Sources for CGAL component library 'CGAL_Qt4' detected
Configuring libCGAL_Qt4
libCGAL_Qt4 needs Qt4, cannot be configured.
Sources for CGAL component libraries 'CGAL_Core;CGAL_ImageIO;CGAL_Qt3;CGAL_Qt4' detected
== Generating build files (DONE) ==
Configuring done
Generating done

希望你能尽快帮助我。非常感谢。

我遇到了完全相同的错误。我意识到,当我通过VS 2010命令提示符构建QGLViewer时,它给出了一个错误来操纵帧.cpp<244>。错误与变量类型有关。

所以在 manipulationdFrame.cpp 中,我更改了第 244 行;

const qreal dist = sqrt(delta.x()*delta.x() + delta.y()*delta.y());

到这条线;

const qreal dist = sqrt(((double)(delta.x()))*((double)(delta.x())) + ((double)(delta.y()))*((double)(delta.y())));

并再次构建它。现在看起来不错。

相关内容

  • 没有找到相关文章

最新更新