I am revisiting lvgl bindings and I am having an issue with a couple of 
functions which are defined as `static inline`. For example with:
    
    
    static inline lv_color_t lv_color_hex(uint32_t c)
    {
        lv_color_t ret;
        ret.red = (c >> 16) & 0xff;
        ret.green = (c >> 8) & 0xff;
        ret.blue = (c >> 0) & 0xff;
        return ret;
    }
    
    
    Run

This function is wrapped by Futhark like:
    
    
    proc lvcolorhex*(c: uint32): lvcolort {.cdecl, importc: "lv_color_hex".}
    
    
    Run

When I compile the code I get:
    
    
    /usr/bin/ld: /home/jose/.cache/nim/ex02_label_d/@mex02_label.nim.c.o: in 
function `main__ex485095label_u3':
    @mex02_label.nim.c:(.text+0x12c): undefined reference to `lv_screen_active'
    /usr/bin/ld: @mex02_label.nim.c:(.text+0x13a): undefined reference to 
`lv_color_hex'
    /usr/bin/ld: @mex02_label.nim.c:(.text+0x187): undefined reference to 
`lv_screen_active'
    /usr/bin/ld: @mex02_label.nim.c:(.text+0x1ce): undefined reference to 
`lv_screen_active'
    /usr/bin/ld: @mex02_label.nim.c:(.text+0x1dc): undefined reference to 
`lv_color_hex'
    collect2: error: ld returned 1 exit status
    Error: execution of an external program failed: 'g++  
@ex02_label_linkerArgs.txt'
    
    
    Run

So it looks like the linker is not finding those symbols.

Do I have to handle this in any special way? I think it is important to note 
that lvgl is compiled with the example. 

Reply via email to