You have too many parentheses in the ccall.

ccall((:inet_addr, "libc"), TestStruct, (Ptr{UInt8},), "localhost")

works fine.

On Sat, Aug 8, 2015 at 2:50 AM, Traktor Toni <[email protected]> wrote:

> workspace()
> immutable TestStruct
>     a::UInt32
> end
> t2 = ccall((:inet_addr, "libc", TestStruct, (Ptr{UInt8},), "localhost"))
>
> Why doesnt this work? And the error is really poor, how am I supposed to
> know which parameters are wrong by reading "unsupported or misplaced
> expression call"?
> I also tried a simpler example with just UInt32 as return value but that
> doesnt work either.
>

Reply via email to