VS2017编译osg3.6.0和osgearth2.10

osg3.6.0正常编译即可,osgearth2.10编译过程中会出现如下错误

1.osgEarth出错

1>HTTPClient.obj : error LNK2019: 无法解析的外部符号 curl_global_init,该符号在函数 "public: static void __cdecl osgEarth::HTTPClient::globalInit(void)" (?globalInit@HTTPClient@osgEarth@@SAXXZ) 中被引用
1>HTTPClient.obj : error LNK2019: 无法解析的外部符号 curl_slist_append,该符号在函数 "private: class osgEarth::HTTPResponse __cdecl osgEarth::HTTPClient::doGet(class osgEarth::HTTPRequest const &,class osgDB::Options const *,class osgEarth::ProgressCallback *)const " (?doGet@HTTPClient@osgEarth@@AEBA?AVHTTPResponse@2@AEBVHTTPRequest@2@PEBVOptions@osgDB@@PEAVProgressCallback@2@@Z) 中被引用
1>HTTPClient.obj : error LNK2019: 无法解析的外部符号 curl_slist_free_all,该符号在函数 "private: class osgEarth::HTTPResponse __cdecl osgEarth::HTTPClient::doGet(class osgEarth::HTTPRequest const &,class osgDB::Options const *,class osgEarth::ProgressCallback *)const " (?doGet@HTTPClient@osgEarth@@AEBA?AVHTTPResponse@2@AEBVHTTPRequest@2@PEBVOptions@osgDB@@PEAVProgressCallback@2@@Z) 中被引用
1>HTTPClient.obj : error LNK2019: 无法解析的外部符号 curl_easy_strerror,该符号在函数 "private: class osgEarth::HTTPResponse __cdecl osgEarth::HTTPClient::doGet(class osgEarth::HTTPRequest const &,class osgDB::Options const *,class osgEarth::ProgressCallback *)const " (?doGet@HTTPClient@osgEarth@@AEBA?AVHTTPResponse@2@AEBVHTTPRequest@2@PEBVOptions@osgDB@@PEAVProgressCallback@2@@Z) 中被引用
1>HTTPClient.obj : error LNK2019: 无法解析的外部符号 curl_easy_init,该符号在函数 "private: void __cdecl osgEarth::HTTPClient::initializeImpl(void)" (?initializeImpl@HTTPClient@osgEarth@@AEAAXXZ) 中被引用
1>HTTPClient.obj : error LNK2019: 无法解析的外部符号 curl_easy_setopt,该符号在函数 "private: class osgEarth::HTTPResponse __cdecl osgEarth::HTTPClient::doGet(class osgEarth::HTTPRequest const &,class osgDB::Options const *,class osgEarth::ProgressCallback *)const " (?doGet@HTTPClient@osgEarth@@AEBA?AVHTTPResponse@2@AEBVHTTPRequest@2@PEBVOptions@osgDB@@PEAVProgressCallback@2@@Z) 中被引用
1>HTTPClient.obj : error LNK2019: 无法解析的外部符号 curl_easy_perform,该符号在函数 "private: class osgEarth::HTTPResponse __cdecl osgEarth::HTTPClient::doGet(class osgEarth::HTTPRequest const &,class osgDB::Options const *,class osgEarth::ProgressCallback *)const " (?doGet@HTTPClient@osgEarth@@AEBA?AVHTTPResponse@2@AEBVHTTPRequest@2@PEBVOptions@osgDB@@PEAVProgressCallback@2@@Z) 中被引用
1>HTTPClient.obj : error LNK2019: 无法解析的外部符号 curl_easy_cleanup,该符号在函数 "public: virtual __cdecl osgEarth::HTTPClient::~HTTPClient(void)" (??1HTTPClient@osgEarth@@UEAA@XZ) 中被引用
1>HTTPClient.obj : error LNK2019: 无法解析的外部符号 curl_easy_getinfo,该符号在函数 "private: class osgEarth::HTTPResponse __cdecl osgEarth::HTTPClient::doGet(class osgEarth::HTTPRequest const &,class osgDB::Options const *,class osgEarth::ProgressCallback *)const " (?doGet@HTTPClient@osgEarth@@AEBA?AVHTTPResponse@2@AEBVHTTPRequest@2@PEBVOptions@osgDB@@PEAVProgressCallback@2@@Z) 中被引用
1>D:\6_OSG_Enviroument\vs2017x64osg360oe2.10.0\osgearth-osgearth-2.10\build\lib\Debug\osgEarthd.dll : fatal error LNK1120: 9 个无法解析的外部命令

在附加依赖项里面,加入curl的静态库路径即可

2.osgEarthSymbology出错

错误原因是protobuf使用静态库就没问题,使用动态库的时候,需要在预处理器里面,添加PROTOBUF_USE_DLLS

3.osgEarthSymbology错误

与osgEarthSymbology错误原因一样,在预处理器里,添加PROTOBUF_USE_DLLS即可。

4.osgEarthTriton错误

将其注释掉

在附加依赖项里添加legacy_stdio_definitions.lib

  • 15
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

aspiretop

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值