I run the following ccall
's:
status = ccall((:ioperm, "libc"), Int32, (Uint, Uint, Int32), 0x378, 5, 1)
ccall((:outb, "libc"), Void, (Uint8, Uint16), 0x00, 0x378)
After the second ccall
I receive the following Error message:
ERROR: ccall: could not find function outb in library libc
in anonymous at no file
in include at ./boot.jl:245
in include_from_node1 at loading.jl:128
in process_options at ./client.jl:285
After some research and messing around I found the following information:
ioperm
is in libc, butoutb
is not- However, both
ioperm
andoutb
are defined in the same header file<sys/io.h>
- An equivalent version of C code compiles and runs smoothly.
outb
inglibc
, however on the systemglibc
is defined aslibc
- Same problem with full path names
/lib/x86_64-linux-gnu/libc.so.6
EDIT:
Thanks for the insight @Employed Russian! I did not look closely enough to realize the extern
declaration. Now, all of my above notes make total sense!
Great, we found that ioperm
is a libc
function that is declared in <sys/io.h>
, and that outb
is not in libc
, but is defined in <sys/io.h>
as a volatile assembly instruction.
Which library, or file path should I use?
Implementation of ccall
.