I have been Googling for the past hour or two, and still no solution has surfaced. There are a lot of forum posts, stackoverflow posts, etc but most if not all are not linking the library (like at all).
I am compiling a sample script this one in particular: http://curl.haxx.se/libcurl/c/sepheaders.html
Background
I have used the same method as this to install: link
First way
Compiled using:
gcc -std=c89 -pedantic -Wall file_name -ofile_name.exe -lcurl
Results:
save.c:26:23: fatal error: curl/curl.h: No such file or directory
#include <curl/curl.h>
^
compilation terminated.
Note
It seemed like curl was not getting unpacked or something.
Second Way
Downloading source and placing the curl dir with curl.h in user\include\curl.
I have been using variations of this to compile/build:
gcc -std=c89 -pedantic -Wall file_name -ofile_name.exe -lcurl
Curl library located here C:\cygwin64\usr\include\curl
Results:
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lcurl
collect2: error: ld returned 1 exit status
Second Way
Compiled using:
gcc -std=c89 -pedantic -Wall file_name -ofile_name.exe -Lcurl
Results:
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0xe7): undefined reference to `curl_global_init'
/cygdrive/c/Users/user3624582/[Finished in 0.4s with exit code 1]AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0xe7): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `curl_global_init'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0xec): undefined reference to `curl_easy_init'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0xec): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `curl_easy_init'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x10d): undefined reference to `curl_easy_setopt'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x10d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `curl_easy_setopt'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x129): undefined reference to `curl_easy_setopt'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x129): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `curl_easy_setopt'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x146): undefined reference to `curl_easy_setopt'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x146): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `curl_easy_setopt'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x173): undefined reference to `curl_easy_cleanup'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x173): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `curl_easy_cleanup'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x1aa): undefined reference to `curl_easy_cleanup'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x1aa): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `curl_easy_cleanup'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x1ce): undefined reference to `curl_easy_setopt'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x1ce): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `curl_easy_setopt'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x1eb): undefined reference to `curl_easy_setopt'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x1eb): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `curl_easy_setopt'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x1f7): undefined reference to `curl_easy_perform'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x1f7): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `curl_easy_perform'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x21b): undefined reference to `curl_easy_cleanup'
/cygdrive/c/Users/user3624582/AppData/Local/Temp/ccHBcDdl.o:save.c:(.text+0x21b): additional relocation overflows omitted from the output
Things tried
Use cygwin to download source (not just binary like before)
Use cygwin to reinstall curl / libcurl
use cygwin to uninstall and install curl / libcurl
I have then tried downloading it from here: http://curl.haxx.se/download.html Towards the bottom of the page for cygwin64.
After a fresh bin download from cygwin: looks like this
Things not yet tried
Crying
Ripping hair out
libcurl
andlibcurl-devel
via cygwin. You will have fileslibcurl.a
andlibcurl.dll.a
under/usr/lib
. Do not download anything from curl.haxx.se. Use-lcurl
, not-Lcurl
. – n. 1.8e9-where's-my-share m.