Click here to Skip to main content
15,888,015 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, i hope I get answers here, since this problem been bugging me since yesterday. I created a small code, using curl, I downloaded the library and put it in the mingw "lib" directory (libcurl.a and libcurldll.a), then I compiled my code with this option
gcc MyCode.c -DCURL_STATICLIB -lcurldll
(I used -lcurldll because I have errors on -lcurl) So now I have the application compiled. First it asked for libcurl.dll (I found it and feed it to the app) then it asked again for libshh2.dll (which I havn't found till now and having trouble compiling it).

When I look at some tutorial, these dll doesn't seem to be needed, what happens to mine?

What I have tried:

I tried compiling libshh2 from the source but no luck since yesterday
Posted
Updated 21-Feb-18 22:13pm

1 solution

Your declaration of -DCURL_STATICLIB means you will use the static library, but you then try to link to the dll. If you use that declaration then you need to specify -lcurl not -lcurldll.
 
Share this answer
 
v2
Comments
Member 13536260 22-Feb-18 4:28am    
Thanks I really need this, but when I use -lcurl, I get an error
undefined reference to _imp_WSAStartup@08
undefined reference to _imp_WSACleanup@00
undefined reference to _imp_WSACleanup@00
*** libcurl.a(easy.o): bad reloc address in section ".data"
collect2.exe: error: id returned 1 exit status 


But not in -lcurldll
Richard MacCutchan 22-Feb-18 5:06am    
You are missing the library (probably a socket library) that contains the referenced functions. Check the documentation for those functions to see which library you need.
Member 13536260 22-Feb-18 5:33am    
God I just knew I was talking to one of the Top Experts here in codeProject. Thanks for the help
Richard MacCutchan 22-Feb-18 5:36am    
You don't have to be an expert to read the documentation.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900