我正在尝试用土土编译VS2010库。库使用CMake,因此在设置所有依赖项之后,它将生成一个VS2010解决方案文件。然而,当在VS中运行build时,我会得到这个链接器错误(以及200个类似的错误)。
错误7错误LNK2019:未解决的外部符号"__declspec(dllimport) public: void __thiscall std::basic_ofstream“::‘`vbase destructor’( void )(Void)”函数中引用的__declspec __thiscall osgEarth::DiskCache::setImage(类osgEarth::TileKey const &,struct osgEarth::CacheSpec const &,类osg::Image *)“(?setImage@DiskCache@osgEarth@@UAEXABVTileKey@2@ABUCacheSpec@2@PBVImage@osg@@@Z) C:\swproj\osgearth-src\src\osgEarth\Caching.obj osgEarth
我对C++不太熟悉,还有什么需要设置的吗?
发布于 2011-10-27 18:32:53
您缺少了对std::ofstream的引用。您要么需要在其中一个文件中包含#include,要么需要在项目中引用标准库dll。
https://stackoverflow.com/questions/7920452
复制相似问题