2011-10-27 201 views
0

我想用VS2010编译osgearth库。该库使用CMake,因此在设置所有依赖关系后,它生成一个VS2010解决方案文件。运行构建VS然而,当我得到这个连接错误(和200级类似的)与CMake和Visual Studio 2010链接错误

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

我不是很熟悉wi th C++,还有什么我必须设置?

回答

0

你错过了对std :: ofstream的引用。您需要在您的某个文件中包含#include或在项目中引用标准库dll。