Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcurl can't resolved external symbol #4492

Closed
mengzhisuoliu opened this issue Oct 16, 2019 · 7 comments

Comments

@mengzhisuoliu
Copy link

@mengzhisuoliu mengzhisuoliu commented Oct 16, 2019

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,

@bagder

This comment has been minimized.

Copy link
Member

@bagder bagder commented Oct 16, 2019

  1. How do you build libcurl?
  2. Doesn't the default build also build the curl tool that uses this lib and that works?
@bagder

This comment has been minimized.

Copy link
Member

@bagder bagder commented Oct 24, 2019

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

@bagder bagder closed this Oct 24, 2019
@zogvm

This comment has been minimized.

Copy link

@zogvm zogvm commented Nov 15, 2019

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

@bagder

This comment has been minimized.

Copy link
Member

@bagder bagder commented Nov 15, 2019

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

@xMikan09

This comment has been minimized.

Copy link

@xMikan09 xMikan09 commented Nov 16, 2019

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"

@bagder

This comment has been minimized.

Copy link
Member

@bagder bagder commented Nov 16, 2019

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.

jay added a commit to jay/curl that referenced this issue Nov 17, 2019
- Generate VQUIC and VSSH filenames in Visual Studio project files.

Prior to this change generated Visual Studio project configurations that
enabled SSH did not build properly. Broken since SSH files were moved to
lib/vssh 3 months ago in 5b2d703.

Bug: curl#4492 (comment)
Reported-by: zogvm@users.noreply.github.com

Closes #xxxx
@jay

This comment has been minimized.

Copy link
Member

@jay jay commented Nov 17, 2019

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

@jay jay reopened this Nov 17, 2019
jay added a commit to jay/curl that referenced this issue Nov 18, 2019
- Generate VQUIC and VSSH filenames in Visual Studio project files.

- Update checksrc.bat to check vquic and vssh directories.

Prior to this change generated Visual Studio project configurations that
enabled SSH did not build properly. Broken since SSH files were moved to
lib/vssh 3 months ago in 5b2d703.

Bug: curl#4492 (comment)
Reported-by: zogvm@users.noreply.github.com

Closes #xxxx
@jay jay closed this in ee5c68a Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.