VS2017 compile error
Posted: Wed Jan 27, 2021 11:50 am
Hello everyone:
I am a newbie in cloudcompare. Recently, I want to develop a plugin for cloudcompare. There are something wrong.
I have already compiled the cloudcompare and its plugins via VS 2015 and VS 2017 with QT5.12.2. That's all correct.
However, when I start a new QT project(SubSampleTools), something wrong happened:
########This is my include path: D:\GraduationProject\repos\to_cmake_build\CloudCompare\build2017\plugins\example\ExamplePlugin\ExamplePlugin_autogen\include_Release;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\plugins\example\ExamplePlugin\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\build2017\libs\qCC_db\extern\CCCoreLib\exports;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\qCC_db\extern\CCCoreLib\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\CCPluginAPI\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\CCPluginStub\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\qCC_glWindow\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\qCC_db\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\CCFbo\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\qCC_io\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\qCC_io\extern\dxflib\src;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\qCC_io\extern\shapelib;
C:\Qt\5.12.2\msvc2017_64\include;
C:\Qt\5.12.2\msvc2017_64\include\QtConcurrent;
C:\Qt\5.12.2\msvc2017_64\include\QtCore;
C:\Qt\5.12.2\msvc2017_64\.\mkspecs\win32-msvc;
C:\Qt\5.12.2\msvc2017_64\include\QtOpenGL;
C:\Qt\5.12.2\msvc2017_64\include\QtWidgets;
C:\Qt\5.12.2\msvc2017_64\include\QtGui;
C:\Qt\5.12.2\msvc2017_64\include\QtANGLE;
C:\Qt\5.12.2\msvc2017_64\include\QtOpenGLExtensions;
%(AdditionalIncludeDirectories)
######VS 2017 compile output:
1>------ 已启动生成: 项目: SubSampleTools, 配置: Release x64 ------
1>moc SubSampleTools.h
1>SubSampleToolsDlg.cpp
1>SubSampleTools.cpp
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\cctypes.h(15): error C2338: type for ScalarType has not been declared (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(127): error C2061: 语法错误: 标识符“ScalarType” (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(131): error C2065: “count”: 未声明的标识符 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(131): error C2065: “out”: 未声明的标识符 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(135): error C2065: “out”: 未声明的标识符 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(140): error C2065: “count”: 未声明的标识符 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(140): error C2065: “out”: 未声明的标识符 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(144): error C2065: “out”: 未声明的标识符 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): error C2737: “CCCoreLib::ScalarType”: 必须初始化“constexpr”对象 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): error C2146: 语法错误: 缺少“;”(在标识符“ZERO_TOLERANCE_SCALAR”的前面) (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): error C2923: “std::numeric_limits”: 对于参数“_Ty”,“CCCoreLib::ScalarType”不是有效的 模板 类型变量 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): note: 参见“CCCoreLib::ScalarType”的声明 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): error C2955: “std::numeric_limits”: 使用 类 模板 需要 模板 参数列表 (编译源文件 SubSampleTools.cpp)
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\limits(70): note: 参见“std::numeric_limits”的声明 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(51): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(51): error C2737: “CCCoreLib::ScalarType”: 必须初始化“constexpr”对象 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(51): error C2086: “const int CCCoreLib::ScalarType”: 重定义 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): note: 参见“CCCoreLib::ScalarType”的声明 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(51): error C2146: 语法错误: 缺少“;”(在标识符“ZERO_TOLERANCE_POINT_COORDINATE”的前面) (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(63): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(63): error C2737: “CCCoreLib::ScalarType”: 必须初始化“constexpr”对象 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(63): error C2086: “const int CCCoreLib::ScalarType”: 重定义 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): note: 参见“CCCoreLib::ScalarType”的声明 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(63): error C2146: 语法错误: 缺少“;”(在标识符“NAN_VALUE”的前面) (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(63): error C2923: “std::numeric_limits”: 对于参数“_Ty”,“CCCoreLib::ScalarType”不是有效的 模板 类型变量 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): note: 参见“CCCoreLib::ScalarType”的声明 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(63): error C2955: “std::numeric_limits”: 使用 类 模板 需要 模板 参数列表 (编译源文件 SubSampleTools.cpp)
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\limits(70): note: 参见“std::numeric_limits”的声明 (编译源文件 SubSampleTools.cpp)
1>c:\users\36392\source\repos\subsampletools\subsampletools\subsampletoolsdlg.cpp(13): error C2027: 使用了未定义类型“Ui::SubSampleToolsDlg”
1>c:\users\36392\source\repos\subsampletools\subsampletools\subsampletoolsdlg.h(9): note: 参见“Ui::SubSampleToolsDlg”的声明
1>c:\users\36392\source\repos\subsampletools\subsampletools\subsampletoolsdlg.cpp(27): error C2027: 使用了未定义类型“Ui::SubSampleToolsDlg”
1>c:\users\36392\source\repos\subsampletools\subsampletools\subsampletoolsdlg.h(9): note: 参见“Ui::SubSampleToolsDlg”的声明
1>c:\users\36392\source\repos\subsampletools\subsampletools\subsampletoolsdlg.cpp(33): error C2027: 使用了未定义类型“Ui::SubSampleToolsDlg”
1>c:\users\36392\source\repos\subsampletools\subsampletools\subsampletoolsdlg.h(9): note: 参见“Ui::SubSampleToolsDlg”的声明
1>已完成生成项目“SubSampleTools.vcxproj”的操作 - 失败。
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
I am a newbie in cloudcompare. Recently, I want to develop a plugin for cloudcompare. There are something wrong.
I have already compiled the cloudcompare and its plugins via VS 2015 and VS 2017 with QT5.12.2. That's all correct.
However, when I start a new QT project(SubSampleTools), something wrong happened:
########This is my include path: D:\GraduationProject\repos\to_cmake_build\CloudCompare\build2017\plugins\example\ExamplePlugin\ExamplePlugin_autogen\include_Release;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\plugins\example\ExamplePlugin\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\build2017\libs\qCC_db\extern\CCCoreLib\exports;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\qCC_db\extern\CCCoreLib\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\CCPluginAPI\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\CCPluginStub\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\qCC_glWindow\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\qCC_db\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\CCFbo\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\qCC_io\include;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\qCC_io\extern\dxflib\src;
D:\GraduationProject\repos\to_cmake_build\CloudCompare\libs\qCC_io\extern\shapelib;
C:\Qt\5.12.2\msvc2017_64\include;
C:\Qt\5.12.2\msvc2017_64\include\QtConcurrent;
C:\Qt\5.12.2\msvc2017_64\include\QtCore;
C:\Qt\5.12.2\msvc2017_64\.\mkspecs\win32-msvc;
C:\Qt\5.12.2\msvc2017_64\include\QtOpenGL;
C:\Qt\5.12.2\msvc2017_64\include\QtWidgets;
C:\Qt\5.12.2\msvc2017_64\include\QtGui;
C:\Qt\5.12.2\msvc2017_64\include\QtANGLE;
C:\Qt\5.12.2\msvc2017_64\include\QtOpenGLExtensions;
%(AdditionalIncludeDirectories)
######VS 2017 compile output:
1>------ 已启动生成: 项目: SubSampleTools, 配置: Release x64 ------
1>moc SubSampleTools.h
1>SubSampleToolsDlg.cpp
1>SubSampleTools.cpp
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\cctypes.h(15): error C2338: type for ScalarType has not been declared (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(127): error C2061: 语法错误: 标识符“ScalarType” (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(131): error C2065: “count”: 未声明的标识符 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(131): error C2065: “out”: 未声明的标识符 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(135): error C2065: “out”: 未声明的标识符 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(140): error C2065: “count”: 未声明的标识符 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(140): error C2065: “out”: 未声明的标识符 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\include\ccserializableobject.h(144): error C2065: “out”: 未声明的标识符 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): error C2737: “CCCoreLib::ScalarType”: 必须初始化“constexpr”对象 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): error C2146: 语法错误: 缺少“;”(在标识符“ZERO_TOLERANCE_SCALAR”的前面) (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): error C2923: “std::numeric_limits”: 对于参数“_Ty”,“CCCoreLib::ScalarType”不是有效的 模板 类型变量 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): note: 参见“CCCoreLib::ScalarType”的声明 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): error C2955: “std::numeric_limits”: 使用 类 模板 需要 模板 参数列表 (编译源文件 SubSampleTools.cpp)
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\limits(70): note: 参见“std::numeric_limits”的声明 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(51): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(51): error C2737: “CCCoreLib::ScalarType”: 必须初始化“constexpr”对象 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(51): error C2086: “const int CCCoreLib::ScalarType”: 重定义 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): note: 参见“CCCoreLib::ScalarType”的声明 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(51): error C2146: 语法错误: 缺少“;”(在标识符“ZERO_TOLERANCE_POINT_COORDINATE”的前面) (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(63): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(63): error C2737: “CCCoreLib::ScalarType”: 必须初始化“constexpr”对象 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(63): error C2086: “const int CCCoreLib::ScalarType”: 重定义 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): note: 参见“CCCoreLib::ScalarType”的声明 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(63): error C2146: 语法错误: 缺少“;”(在标识符“NAN_VALUE”的前面) (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(63): error C2923: “std::numeric_limits”: 对于参数“_Ty”,“CCCoreLib::ScalarType”不是有效的 模板 类型变量 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(48): note: 参见“CCCoreLib::ScalarType”的声明 (编译源文件 SubSampleTools.cpp)
1>d:\graduationproject\repos\to_cmake_build\cloudcompare\libs\qcc_db\extern\cccorelib\include\ccconst.h(63): error C2955: “std::numeric_limits”: 使用 类 模板 需要 模板 参数列表 (编译源文件 SubSampleTools.cpp)
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\limits(70): note: 参见“std::numeric_limits”的声明 (编译源文件 SubSampleTools.cpp)
1>c:\users\36392\source\repos\subsampletools\subsampletools\subsampletoolsdlg.cpp(13): error C2027: 使用了未定义类型“Ui::SubSampleToolsDlg”
1>c:\users\36392\source\repos\subsampletools\subsampletools\subsampletoolsdlg.h(9): note: 参见“Ui::SubSampleToolsDlg”的声明
1>c:\users\36392\source\repos\subsampletools\subsampletools\subsampletoolsdlg.cpp(27): error C2027: 使用了未定义类型“Ui::SubSampleToolsDlg”
1>c:\users\36392\source\repos\subsampletools\subsampletools\subsampletoolsdlg.h(9): note: 参见“Ui::SubSampleToolsDlg”的声明
1>c:\users\36392\source\repos\subsampletools\subsampletools\subsampletoolsdlg.cpp(33): error C2027: 使用了未定义类型“Ui::SubSampleToolsDlg”
1>c:\users\36392\source\repos\subsampletools\subsampletools\subsampletoolsdlg.h(9): note: 参见“Ui::SubSampleToolsDlg”的声明
1>已完成生成项目“SubSampleTools.vcxproj”的操作 - 失败。
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========