CGAL编译错误

来源:互联网 发布:韩国身份证汉字 知乎 编辑:程序博客网 时间:2024/05/16 17:23

资料来源于网络整理






最近用Qt5.2.0版本编译Windows下代码,发现编译错误

 

D:\Qt\Qt5.2.0\5.2.0\msvc2012\include\QtCore\qdatetime.h:122:error: C2589: “(”:“::”右边的非法标记

D:\Qt\Qt5.2.0\5.2.0\msvc2012\include\QtCore\qdatetime.h:122:error: C2059:语法错误:“::”

错误代码如下:

staticinlineqint64nullJd(){returnstd::numeric_limits<qint64>::min();}

 

一时间不知所云,google

应该是系统函数与Qtmin函数冲突导致的,修改如下,添加括号

 

staticinlineqint64nullJd(){return(std::numeric_limits<qint64>::min)();}



 

QTWindows下编译还有很多小问题,比如有的时候代码其实没有编译,必须删除debugrelease目录之后才会重新编译。

 

最后环境变量Path: D:\CGAL\x64_build\bin






Appendix: How to Set the PATH Variableor Other Environment Variables on Windows Systems

From the desktop, right-click MyComputer and click properties (on Vista/Win7 click Advanced system settings onthe left side).

  • In the System Properties window, click on the Advanced tab.
  • In the Advanced section, click the Environment Variables button.
  • Finally, in the User Variables area, you can add or edit variables.
  • To add a new one click on New, the first line is the name of the variable (PATH for example), the second the value. If several values are added, they must be separated by a ;.
  • To modify one, select it and click on Edit...

  C:\Program Files;C:\Winnt;C:\Winnt\System32

  • Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown above.

0 0