2011-10-27 259 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。