Skip to content

libcurl can't resolved external symbol  #4492

Closed

Description

@mengzhisuoliu

I did this

i use the curl-7.66.0 version to complie lib Release - Lib OpenSSL - Lib LibSSH2 with vs2017,the compile is ok.
it generate libcurl.lib ,i use libcurl.lib for the project,it can't work!it show like this:
Error LNK2019 unresolved external symbol _Curl_ssh_init referenced in function _global_init
Error LNK2019 unresolved external symbol _Curl_ssh_cleanup referenced in function _curl_global_cleanup
Error LNK2001 unresolved external symbol _Curl_handler_scp
Error LNK2001 unresolved external symbol _Curl_handler_sftp
Error LNK2019 unresolved external symbol _Curl_ssh_version referenced in function _curl_version
Error LNK1120 5 unresolved externals

I expected the following

curl/libcurl version

curl-7.66.0
[curl -V output]

operating system

WIN10,

Activity

  1. bagder commented on Oct 16, 2019

    @bagder
    Member
    1. How do you build libcurl?
    2. Doesn't the default build also build the curl tool that uses this lib and that works?
  2. bagder commented on Oct 24, 2019

    @bagder
    Member

    No response and lots of people have built curl without getting this. Closing.

  3. zogvm commented on Nov 15, 2019

    @zogvm

    vs prj miss : lib\vssh\ and lib\vquic dir .
    add .c file to prj .
    just ok

  4. bagder commented on Nov 15, 2019

    @bagder
    Member

    @zogvm What files are you then talking about that need this fix?

  5. xMikan09 commented on Nov 16, 2019

    @xMikan09

    it worked after I put :
    #pragma comment(lib, "libcurl_imp.lib")

    but I forgot where I downloaded the "libcurl_imp.lib" since the project only creates "libcurl.lib"

  6. bagder commented on Nov 16, 2019

    @bagder
    Member

    I would strongly discourage everyone from downloading and using a library from a random site that isn't vetted and trusted. It is then much better to get the source package and built it yourself to be completely sure what you're running and how to (re-)produce it etc.

  7. jay commented on Nov 17, 2019

    @jay
    Member

    I don't think what @xMikan09 said is related. Otherwise this is a bug though. Please try fix in #4607.

  8. reopened this on Nov 17, 2019
  9. locked as resolved and limited conversation to collaborators on Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions