The following _does_ work:
    
    
    // file ccall.c
    int some_weirdly_named_func(int p)
    {
       return(p += 10);
    }
    
    Run
    
    
    # file ccaller.nim
    {.compile:"ccall.c".}
    
    proc weirdCcall(p: cint) : cint         
{.importc:"some_weirdly_named_func".}
    
    let r = weirdCcall(3)
    echo $r
    
    Run

Note that nim _can_ import "some_weirdly_named_func()" as one is free to name 
it in Nim as one wishes (in the example `weirdCcall`). One might as well stick 
with `some_weirdly_named_func` but then Nim will treat the Nim version as if 
one had called it `someweirdlynamedfunc` \- but still call the correct C 
function.

Reply via email to