I'm getting an error from ccall when the first argument is a tuple of a
symbol and a string.
julia> libwsmp
"/home/bates/.julia/v0.4/WSMP/deps/usr/lib/libwsmp"
julia>
ccall((:wkktord_,libwsmp),Void,(Ptr{Cint},Ptr{Cint},Ptr{Cint},Ptr{Cint},Ptr{Cint},
Ptr{Cint},Ptr{Cint},Ptr{Cint},Ptr{Cint}),
&n,adj.colptr,adj.rowval,options,&1,perm,invp,C_NULL,&0)
ERROR: type: anonymous: in ccall: first argument not a pointer or valid
constant expression, expected DataType, got Type{(Any...,)}
in anonymous at no file
but the same call with a dlsym works
julia> hh = dlopen_e(libwsmp)
Ptr{Void} @0x0000000006541b50
julia>
ccall(dlsym(hh,"wkktord_"),Void,(Ptr{Cint},Ptr{Cint},Ptr{Cint},Ptr{Cint},Ptr{Cint},
Ptr{Cint},Ptr{Cint},Ptr{Cint},Ptr{Cint}),
&n,adj.colptr,adj.rowval,options,&1,perm,invp,C_NULL,&0)
I use the ccall((<Symbol>,<String),... idiom in several other places in the
same Module and can't see what I am doing differently here to cause an
error. Can someone give me a hint?
julia> versioninfo()
Julia Version 0.4.0-dev+124
Commit eb5b91c (2014-08-14 13:15 UTC)
Platform Info:
System: Linux (x86_64-pc-linux-gnu)
CPU: AMD Athlon(tm) II X4 635 Processor
WORD_SIZE: 64
BLAS: libopenblas (NO_AFFINITY BARCELONA)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3