zoukankan      html  css  js  c++  java
  • windows下的libcur问题-ROS build on windows

    参考链接:

    https://www.twblogs.net/a/5c41d40cbd9eee35b21e9158

    最近尝试在windows下编译ROS源码,不得不说Windows下编译开源项目真的蛋疼到死。这里简单介绍一下libcurl问题。

    不得不说Windows下的VCPKG包管理工具真的很不错,下载各种依赖库库很方便。

    对于libcurl的更多了解请看官网:http://curl.haxx.se/

    ROS源码编译错误:

    LibcurlExample.obj : error LNK2019: 無法解析的外部符號 __imp_curl_global_init
    LibcurlExample.obj : error LNK2019: 無法解析的外部符號 __imp_curl_global_cleanup
    LibcurlExample.obj : error LNK2019: 無法解析的外部符號 __imp_curl_easy_strerror
    LibcurlExample.obj : error LNK2019: 無法解析的外部符號 __imp_curl_easy_init
    LibcurlExample.obj : error LNK2019: 無法解析的外部符號 __imp_curl_easy_setopt
    主要还是link失败问题。需要添加库链接:

    1.在源码中添加:

    #pragma comment(lib, "ws2_32.lib")
    #pragma comment(lib, "wldap32.lib")
    #pragma comment(lib, "crypt32.lib")
    #pragma comment(lib, "advapi32.lib")
    #pragma comment(lib, "libcurl.lib的绝对路径")
    #pragma comment(lib, "winmm.lib")
    #pragma comment(lib, "Normaliz.lib")

    #define CURL_STATICLIB或者#define CURL_LIB

    OK 

  • 相关阅读:
    SpringMVC详解
    java设计模式
    运行时异常与一般异常区别
    oracle基本操作大全
    get post 区别
    hibernate
    Spring框架
    http和https
    JDBC详解
    (转)Entity Framework4.1实现动态多条件查询、分页和排序
  • 原文地址:https://www.cnblogs.com/foreversdf/p/13049346.html
Copyright © 2011-2022 走看看