i just downloaded and isntalled chcurl
(chcurl-2.0.0.tar.gz), but i cant get it to work.
I have ch version 5.1.0.12661 that i just downloaded
from their site.
i also downloaded and installed chpcre and chsqlite and
both worked perfectly from the first time. but i cant
get chcurl to work, i even tried uninstalling and
reinstalling, but with no success.
here is what i get when trying to run one of the demos:
pdoru@dtp:~/work/ch/chcurl-2.0.0/demos$ ch ./simple.c
ERROR: function 'curl_easy_init()' not defined
ERROR: function 'curl_easy_perform()' not defined
ERROR: function 'curl_easy_cleanup()' not defined
ERROR: cannot execute command
'/work/work/ch/chcurl-2.0.0/demos/simple.c'
strace shows that it doesn't even attempt to load the
.dl library. see a log somewhere below.
here is what i get when installing it:
root@dtp:/work/work/ch/chcurl-2.0.0# make
ch ./pkgcreate.ch
Clean up existing directories and create new ones ...
Copying header files ...
Adding LOAD_CHDL into curl.h ...
Echo copying demo programs ...
Extracting function prototypes ...
Creating a header file containing all functions to
export ...
removing special function in curl.h ...
Generating xxx_chdl.c in c/ and xxx.chf in chcurl/lib ...
Patching special .chf files ...
Building the dynamically loaded library ...
make[1]: Entering directory `/work/work/ch/chcurl-2.0.0/c'
rm -f *.dl *.o *.obj *.a *.dll *.exp *.lib
make[1]: Leaving directory `/work/work/ch/chcurl-2.0.0/c'
make[1]: Entering directory `/work/work/ch/chcurl-2.0.0/c'
ch dlcomp libcurl.dl -c curl_chdl.c
-I/usr/local/include -I/usr/include
ch dlcomp libcurl.dl -c easy_chdl.c
-I/usr/local/include -I/usr/include
ch dlcomp libcurl.dl -c multi_chdl.c
-I/usr/local/include -I/usr/include
ch dlcomp libcurl.dl -c
handmade/curl/curl_share_setopt_chdl.c
-I/usr/local/include -I/usr/include
ch dlcomp libcurl.dl -c
handmade/curl/curl_slist_append_chdl.c
-I/usr/local/include -I/usr/include
ch dlcomp libcurl.dl -c
handmade/curl/curl_formadd_chdl.c -I/usr/local/include
-I/usr/include
ch dlcomp libcurl.dl -c
handmade/curl/curl_formparse_chdl.c
-I/usr/local/include -I/usr/include
handmade/curl/curl_formparse_chdl.c: In function
'curl_formparse_chdl':
handmade/curl/curl_formparse_chdl.c:4: warning:
incompatible implicit declaration of built-in function
'printf'
ch dlcomp libcurl.dl -c
handmade/easy/curl_easy_getinfo_chdl.c
-I/usr/local/include -I/usr/include
ch dlcomp libcurl.dl -c
handmade/easy/curl_easy_setopt_chdl.c
-I/usr/local/include -I/usr/include
ch dllink libcurl.dl curl_chdl.o easy_chdl.o
multi_chdl.o curl_share_setopt_chdl.o
curl_slist_append_chdl.o curl_formadd_chdl.o
curl_formparse_chdl.o curl_easy_getinfo_chdl.o
curl_easy_setopt_chdl.o -lcurl
make[1]: Leaving directory `/work/work/ch/chcurl-2.0.0/c'
make[1]: Entering directory `/work/work/ch/chcurl-2.0.0/c'
rm -f *.dl *.o *.obj *.a *.dll *.exp *.lib
make[1]: Leaving directory `/work/work/ch/chcurl-2.0.0/c'
Testing the dynamically loaded library ...
package chcurl created successfully!
my ch version is:
ch -v
Ch
Standard edition, version 5.1.0.12661
(C) Copyright 2001-2005 SoftIntegration, Inc.
http://www.softintegration.com
I just downloaded it from their site.
here is a strace log:
pdoru@dtp:~/work/ch/chcurl-2.0.0/demos$ ch ./simple.c
ERROR: function 'curl_easy_init()' not defined
ERROR: function 'curl_easy_perform()' not defined
ERROR: function 'curl_easy_cleanup()' not defined
ERROR: cannot execute command
'/work/work/ch/chcurl-2.0.0/demos/simple.c'
pdoru@dtp:~/work/ch/chcurl-2.0.0/demos$ strace -eopen
ch ./simple.c
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/usr/lib/libncurses.so.5", O_RDONLY) = 3
open("/lib/libm.so.6", O_RDONLY) = 3
open("/lib/libc.so.6", O_RDONLY) = 3
open("/lib/libdl.so.2", O_RDONLY) = 3
open("/lib/libcrypt.so.1", O_RDONLY) = 3
open("/etc/nsswitch.conf", O_RDONLY) = 3
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib/libnss_files.so.2", O_RDONLY) = 3
open("/etc/passwd", O_RDONLY) = 3
open("/etc/localtime", O_RDONLY) = 3
open("/etc/passwd", O_RDONLY) = 3
open("/usr/local/ch/config/chrc", O_RDONLY) = 3
open("/home/pdoru/.chrc", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/work/work/ch/chcurl-2.0.0/demos/simple.c",
O_RDONLY) = 3
open("/work/work/ch/chcurl-2.0.0/demos/simple.c",
O_RDONLY) = 3
open("/usr/local/ch/include/stdio.h", O_RDONLY) = 4
open("/usr/local/ch/include/stdio.h", O_RDONLY) = 4
open("/usr/local/ch/include/stdarg.h", O_RDONLY) = 5
open("/usr/local/ch/include/stdarg.h", O_RDONLY) = 5
open("/usr/local/ch/include/chdl.h", O_RDONLY) = 5
open("/usr/local/ch/include/chdl.h", O_RDONLY) = 5
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 6
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 6
open("/usr/local/ch/lib/libc/exit.chf", O_RDONLY) = 5
open("/usr/local/ch/toolkit/include/curl/curl.h",
O_RDONLY) = 4
open("/usr/local/ch/toolkit/include/curl/curl.h",
O_RDONLY) = 4
open("/usr/local/ch/include/chdl.h", O_RDONLY) = 5
open("/usr/local/ch/include/chdl.h", O_RDONLY) = 5
open("/usr/local/ch/toolkit/include/curl/curlver.h",
O_RDONLY) = 5
open("/usr/local/ch/toolkit/include/curl/curlver.h",
O_RDONLY) = 5
open("/usr/local/ch/include/stdio.h", O_RDONLY) = 5
open("/usr/local/ch/include/stdio.h", O_RDONLY) = 5
open("/usr/local/ch/include/limits.h", O_RDONLY) = 5
open("/usr/local/ch/include/limits.h", O_RDONLY) = 5
open("/usr/local/ch/include/ch/limits.h", O_RDONLY) = 6
open("/usr/local/ch/include/ch/limits.h", O_RDONLY) = 6
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 5
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 5
open("/usr/local/ch/include/inttypes.h", O_RDONLY) = 6
open("/usr/local/ch/include/inttypes.h", O_RDONLY) = 6
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 7
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 7
open("/usr/local/ch/include/stdint.h", O_RDONLY) = 7
open("/usr/local/ch/include/stdint.h", O_RDONLY) = 7
open("/usr/local/ch/include/time.h", O_RDONLY) = 5
open("/usr/local/ch/include/time.h", O_RDONLY) = 5
open("/usr/local/ch/include/sys/time.h", O_RDONLY) = 6
open("/usr/local/ch/include/sys/time.h", O_RDONLY) = 6
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 7
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 7
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 7
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 7
open("/usr/local/ch/dl/libsystime.dl", O_RDONLY) = 7
open("/usr/local/ch/include/signal.h", O_RDONLY) = 6
open("/usr/local/ch/include/signal.h", O_RDONLY) = 6
open("/usr/local/ch/include/ch/signal.h", O_RDONLY) = 7
open("/usr/local/ch/include/ch/signal.h", O_RDONLY) = 7
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 8
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 8
open("/usr/local/ch/include/ch/siginfo.h", O_RDONLY) = 8
open("/usr/local/ch/include/ch/siginfo.h", O_RDONLY) = 8
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 7
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 7
open("/usr/local/ch/dl/libsignal.dl", O_RDONLY) = 7
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 6
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 6
open("/usr/local/ch/dl/libtime.dl", O_RDONLY) = 6
open("/usr/local/ch/toolkit/include/curl/easy.h",
O_RDONLY) = 5
open("/usr/local/ch/toolkit/include/curl/easy.h",
O_RDONLY) = 5
open("/usr/local/ch/toolkit/include/curl/multi.h",
O_RDONLY) = 5
open("/usr/local/ch/toolkit/include/curl/multi.h",
O_RDONLY) = 5
open("/usr/local/ch/include/sys/socket.h", O_RDONLY) = 6
open("/usr/local/ch/include/sys/socket.h", O_RDONLY) = 6
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 7
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 7
open("/usr/local/ch/include/sys/uio.h", O_RDONLY) = 7
open("/usr/local/ch/include/sys/uio.h", O_RDONLY) = 7
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 8
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 8
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 8
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 8
open("/usr/local/ch/dl/libuio.dl", O_RDONLY) = 8
open("/usr/local/ch/include/ch/sys/socket.h", O_RDONLY) = 7
open("/usr/local/ch/include/ch/sys/socket.h", O_RDONLY) = 7
open("/usr/local/ch/include/ch/sockios.h", O_RDONLY) = 8
open("/usr/local/ch/include/ch/sockios.h", O_RDONLY) = 8
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 7
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 7
open("/usr/local/ch/dl/libsocket.dl", O_RDONLY) = 7
open("/usr/local/ch/include/sys/time.h", O_RDONLY) = 6
open("/usr/local/ch/include/sys/time.h", O_RDONLY) = 6
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 6
open("/usr/local/ch/include/sys/types.h", O_RDONLY) = 6
open("/usr/local/ch/toolkit/include/curl/curl.h",
O_RDONLY) = 6
open("/usr/local/ch/toolkit/include/curl/curl.h",
O_RDONLY) = 6
open("/usr/local/ch/lib/libc/exit.chf", O_RDONLY) = 3
open("/usr/local/ch/lib/libc/dlclose.chf", O_RDONLY) = 3
open("/usr/local/ch/lib/libc/dlclose.chf", O_RDONLY) = 3
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 4
open("/usr/local/ch/include/dlfcn.h", O_RDONLY) = 4
ERROR: function 'curl_easy_init()' not defined
open("/usr/local/ch/package/chcurl/lib/curl_easy_setopt.chf",
O_RDONLY) = 3
open("/usr/local/ch/package/chcurl/lib/curl_easy_setopt.chf",
O_RDONLY) = 3
ERROR: function 'curl_easy_perform()' not defined
ERROR: function 'curl_easy_cleanup()' not defined
ERROR: cannot execute command
'/work/work/ch/chcurl-2.0.0/demos/simple.c'