hi!

i'm trying to use ccall in the following example:

julia> x = zeros(10) 
10-element Array{Float64,1}: 
0.0 
0.0 
0.0 
0.0 
0.0 
0.0 
0.0 
0.0 
0.0 
0.0

julia> w = zeros(10) 
10-element Array{Float64,1}: 
0.0 
0.0 
0.0 
0.0 
0.0 
0.0 
0.0 
0.0 
0.0 
0.0 

julia> n = 4 
4 
julia> ccall( (:cc, "sparselib"), (Int, Ptr{Float64},Ptr{Float64}), (Int, 
Ptr{Float64},Ptr{Float64}),n,x,w) 
ERROR: error compiling anonymous: in anonymous: ccall: missing return type

the calling interface of the cc function is

void cc ( int n, double x[], double w[] )

ie it returns nothing.

i compiled this library and it seems to work:

julia> ccall( (:cpu_time, "sparselib"), Int32, ())

2395765

thanks!



Reply via email to