繁体   English   中英

CMake和Visual Studio 2010链接错误

[英]linking error with CMake and Visual Studio 2010

我正在尝试使用VS2010编译osgearth库。 该库使用CMake,因此在设置所有依赖项后,它将生成VS2010解决方案文件。 但是,在VS中运行build时,出现此链接器错误(以及200个类似的错误)

错误7错误LNK2019:无法解析的外部符号“ __declspec(dllimport)public:void __thiscall std :: basic_ofstream> ::`vbase destructor'(void)”(_ imp ?? _ D?$ basic_ofstream @ DU?$ char_traits @ D @ std函数“ public:virtual void __thiscall osgEarth :: DiskCache :: setImage(class osgEarth :: TileKey const&,struct osgEarth :: CacheSpec const&,osg :: Image const *)”中引用的@@@ std @@ QAEXXZ) (?setImage @ DiskCache @ osgEarth @@ UAEXABVTileKey @ 2 @ ABUCacheSpec @ 2 @ PBVImage @ osg @@@ Z)C:\\ swproj \\ osgearth-src \\ src \\ osgEarth \\ Caching.obj osgEarth

我对C ++不太熟悉,还有什么需要设置的吗?

您缺少对std :: ofstream的引用。 您可能需要在文件之一中包含#include,或者需要对项目中标准库dll的引用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM