kodi doesn't link to curl at compile time. rather it dlopen's the library on runtime when needed. DllLibCurl.h is the wrapper for using it in such a manner. doing that in your add-on entails quite a lot of code, and i really do not recommend even attempting it (you'd pull in large parts of the kodi codebase..). also it wouldn't solve your problem in any way.
a small explanation of debian packaging and unix library handling seems in order.
packages in debian is split in runtime and development packages. in particular, the -dev packages holds the headers, and certain important symlinks related to how linux library versioning works. these are files only needed during development, none of this should be needed during runtime (i.e. for users).
consider this output;
Code:
ls /usr/lib/x86_64-linux-gnu/libcurl*so* -l
lrwxrwxrwx 1 root root 23 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so -> libcurl-gnutls.so.4.3.0
lrwxrwxrwx 1 root root 19 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.3 -> libcurl-gnutls.so.4
lrwxrwxrwx 1 root root 23 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 -> libcurl-gnutls.so.4.3.0
-rw-r--r-- 1 root root 401512 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.3.0
lrwxrwxrwx 1 root root 17 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl.so -> libcurl-gnutls.so
lrwxrwxrwx 1 root root 12 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl.so.3 -> libcurl.so.4
lrwxrwxrwx 1 root root 16 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl.so.4 -> libcurl.so.4.3.0
-rw-r--r-- 1 root root 422696 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl.so.4.3.0
this is my system when i have libcurl4-gnutls-dev installed. note how the libcurl.so symlink points to libcurl-gnutls.so (which again is a symlink to libcurl-gnutls.so.4.3.0).
and this is my system when i have libcurl4-openssl-dev installed
Code:
ls /usr/lib/x86_64-linux-gnu/libcurl*so* -l
lrwxrwxrwx 1 root root 19 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.3 -> libcurl-gnutls.so.4
lrwxrwxrwx 1 root root 23 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 -> libcurl-gnutls.so.4.3.0
-rw-r--r-- 1 root root 401512 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.3.0
lrwxrwxrwx 1 root root 16 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl.so -> libcurl.so.4.3.0
lrwxrwxrwx 1 root root 12 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl.so.3 -> libcurl.so.4
lrwxrwxrwx 1 root root 16 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl.so.4 -> libcurl.so.4.3.0
-rw-r--r-- 1 root root 422696 Jan 26 21:05 /usr/lib/x86_64-linux-gnu/libcurl.so.4.3.0
now libcurl.so points to libcurl.so.4.3.0 (the openssl variant).
since these packages hold the same files, they are mutually exclusive. you will notice that if you install one, the other is removed (if it was already installed).
now, why is this important? because that symlink (libcurl.so) is the thing used when your application links the curl library (i.e. when you add -lcurl in the Makefile).
however, the first symlink is resolved. so in the resulting binary, the shared library it points to will be recorded - namely libcurl.so.4 (if i have the libcurl4-openssl-dev package installed),
or libcurl-gnutls.so.4 (if i have the gnutls version installed).
why all this explaining? to point out that which -dev package you have installed will affect which library your add-on links to. and that for this reason binaries are NOT portable across distros, nor across versions of the same distro. you cannot build on 14.04 and expect to run on anything else.
show me the output of
on the box where it doesn't run please. i just built on my box, it locks for a long time on curl timeout in the addon but it loads and initializes fine.
my suspicion is that your kodi is using one curl and the addon the other.