解决SkyP2M工程常见问题所参考的博客汇总

时间:2023-03-09 14:34:19
解决SkyP2M工程常见问题所参考的博客汇总

工程是基于64位的
1
Error 26 error C2491: 'HUDManager::_viewport' : definition of dllimport static data member not allowed E:\SkyP2M_V1.0\pmVisualization\pmVisualization\HUDManager.cpp 8 osgPC 1

VS下 dllimport与dllexport作用与区别 :https://www.cnblogs.com/foohack/p/4119207.html
简单直接介绍:https://www.cnblogs.com/nzbbody/p/3448385.html
加上预定义宏“PMVISUALIZATION_EXPORT_LIBRARY” : https://blog.csdn.net/gengxt2003/article/details/6417780
2
Error 84 error C1189: #error : ERROR macro is defined. Define GLOG_NO_ABBREVIATED_SEVERITIES before including logging.h. See the document for detail. E:\SkyP2M_V1.0\code_lib64\include\glog\log_severity.h 55 osgPC 1

关于Glog/log_severity.h 日志使用中预定义宏冲突的解决: http://www.voidcn.com/article/p-mkgmbinx-bdc.html
3
Error 140 error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall osg::Node::ascend(class osg::NodeVisitor &)" (__imp_?ascend@Node@osg@@UAEXAAVNodeVisitor@2@@Z) E:\SkyP2M_V1.0\pmPanoramaCache\pmPanoramaCache\create_panorma.obj pmPanoramaCache
工程由32位调整为64位
解决SkyP2M工程常见问题所参考的博客汇总

调整之后,回车保存。此问题的产生的原因是该工程是为64位机器运行而做的配置。

4
Error 4 error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. E:\SkyP2M_V1.0\code_lib64\include\flann\util\serialization.h 362 RoadMarkingExtraction 1
理解及解决方案:https://blog.csdn.net/lbc2100/article/details/79884053

5
Error 31 error C2589: '(' : illegal token on right side of '::' E:\SkyP2M_V1.0\code_lib64\include\pcl\correspondence.h 75 SemiAutoObjectExtraction 1
通过括号“()”来避免预编译器报错:https://www.cnblogs.com/wenshanzh/p/3586412.html
原理:https://blog.csdn.net/clever101/article/details/79443301
加括号前:
解决SkyP2M工程常见问题所参考的博客汇总

加括号后:
解决SkyP2M工程常见问题所参考的博客汇总

6
Error 19 error C2446: '<=' : no conversion from 'std::numeric_limits::_Ty (__cdecl *)(void) throw()' to 'Scalar' E:\SkyP2M_V1.0\code_lib64\include\pcl\common\impl\eigen.hpp 262 SemiAutoObjectExtraction 1
可能是解决方案:https://social.msdn.microsoft.com/Forums/vstudio/en-US/e94865f7-84cd-4912-8339-6ee95fb58825/numericlimitsltdoublegtmax-not-recognized?forum=vcgeneral
同时做了如下 调整
解决SkyP2M工程常见问题所参考的博客汇总

7 qt+vc2013:https://www.jianshu.com/p/74f1e8b89078

8
6974 IntelliSense: identifier "QT3_SUPPORT_CONSTRUCTOR" is undefined e:\SkyP2M_V1.0\code_lib64\qt_4.8.6\src\gui\kernel\qaction.h 106 SkyP2M 5
6976 IntelliSense: expected an identifier e:\SkyP2M_V1.0\code_lib64\qt_4.8.6\src\gui\widgets\qmenu.h 198 SkyP2M 12
问题出在我的QT版本,我用的是5.7,实际原有工程使用的是4.8.6。只需要重新安装QT并修改对应的目录即可
是由于这篇博客让我想到了是版本问题导致的:https://blog.csdn.net/zouyu1746430162/article/details/78069726
9
关于build和rebuild
https://www.cnblogs.com/tylerdonet/archive/2012/02/03/2336985.html
MSDN中的生成和编辑参考资料:https://docs.microsoft.com/zh-cn/cpp/build/reference/c-cpp-building-reference?view=vs-2019

10
关于Debug和Release
https://www.cnblogs.com/cwwmmv/p/9151386.html

11
关于添加自定义的目录宏:有两种方法,一种是环境变量,但是要重启VS;一种是属性管理器。
https://blog.csdn.net/chinabinlang/article/details/12774209

12
缺少部分的dll,如下图,应该是对应的运行目录没有配置到环境变量
解决SkyP2M工程常见问题所参考的博客汇总
解决方法:
解决SkyP2M工程常见问题所参考的博客汇总

解决SkyP2M工程常见问题所参考的博客汇总