Re: Problems with 4.1

new topic     » goto parent     » topic index » view thread      » older message » newer message

You can find libc.so on Linux with > locate libc.so
(Note: there is also a libc.a - which is not a shared library.)

On Mint, it's not in the standard location, but when I run open_dll with the actual location found above:

 
include std/dlle 
 
? open_dll("/lib/x86_64-linux-gnu/libc.so.6") 
 

It opens the dll.

-- full test: 
include std/dll.e 
include std/console.e 
include std/machine.e 
 
atom LIBC = open_dll("/lib/x86_64-linux-gnu/libc.so.6") 
atom cprintf = define_c_func(LIBC,"printf",{C_POINTER,C_POINTER},C_INT) 
 
atom txt = allocate_string("This is a test") 
atom fmt = allocate_string("-- %s --") 
 
integer len = c_func(cprintf,{fmt,txt}) 
 
display("\n\n[] characters printed",len) 
 

irv@Mint18 ~ $ eui libctest 
-- This is a test -- 
 
20 characters printed 

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu