This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems linking against libcurl under cygwin


Hi - New to Cygwin for development, not new to development.

Have a project that uses libcurl which will not link under Cygwin.  All of the
basic libcurl APIs show up as unresolved in the link process.

Example:

gcc -L/usr/local/lib -lcurl -shared ../../shared/htmlparse/htmlparse.o ../../sha
red/wwwfetch/wwwfetch.o ../shared/free.o key.o -o key.so
key.o(.text+0x3ae):key.c: undefined reference to `_curl_global_init'
key.o(.text+0x3b3):key.c: undefined reference to `_curl_easy_init'
key.o(.text+0x420):key.c: undefined reference to `_curl_easy_setopt'
key.o(.text+0x42b):key.c: undefined reference to `_curl_easy_perform'
key.o(.text+0x436):key.c: undefined reference to `_curl_easy_cleanup'
collect2: ld returned 1 exit status
make: *** [key.so] Error 1

I believe I have checked all the obvious things.

1) libcurl.a is located in /lib
2) libcurl is in my library path (obviously)
3) libcurl.a is being linked against (if I change -lcurl to -lcurlx I get an
error for not finding the library)
4) I've tried using both libcurl binaries from Cygwin and building libcurl
from sources
5) I also tried linking against libcurl.dll.a as well, makes no difference.

This same code links, runs, etc under FreeBSD and Linux just fine.

Are there special linking requirements under Cygwin or something obvious I'm
missing?

Thanks in advance,
Jason Riffel (jer-cygwin _AT_ totalembedded.com)



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]