For what it's worth, changing the Makefile nim invocation to
    
    
    nim --app:lib --dynlibOverride:libsqlite3 --passC:'-I$(HEADERS)' 
--passL:'-L$(LIB) -lsqlite3' c blah.nim
    
    
    Run

now does seem to look at the correct headers, but generates a series of clang 
errors, including
    
    
    error: variable has incomplete type 'void'
    N_CDECL(void, 
sqlite3_result_text)(tyObject_Context__lqWKcpVZHBAvFwpem6LnQA* para1, NCSTRING 
para2, NI32 para3, tyProc__32w2ZypAyMWuajvi2Jt79cg para4);
    /usr/local/opt/sqlite/include/sqlite3ext.h:465:40: note: expanded from 
macro 'sqlite3_result_text'
    #define sqlite3_result_text            sqlite3_api->result_text
                                           ^
    
    
    Run

and
    
    
    error: expected ';' after top level declarator
    /usr/local/opt/sqlite/include/sqlite3ext.h:465:51: note: expanded from 
macro 'sqlite3_result_text'
    #define sqlite3_result_text            sqlite3_api->result_text
                                                      ^
    
    
    Run

from the same source line, then
    
    
    error: redefinition of 'sqlite3_api' with a different type: 'NI32' (aka 
'int') vs 'const sqlite3_api_routines *' (aka 'const struct 
sqlite3_api_routines *')
    N_CDECL(NI32, 
sqlite3_create_function)(tyObject_Sqlite3__xRZkbCqVWSKf8kX4o9cbKXA* para1, 
NCSTRING zFunctionName, NI32 nArg, NI32 eTextRep, void* para5, 
tyProc__6Yks26GSlDD9ceXKMfCff9ag xFunc, tyProc__6Yks26GSlDD9ceXKMfCff9ag xStep, 
tyProc__WvL29aegxbmsZ0AcAEAA4CA xFinal);
                  ^
    /usr/local/opt/sqlite/include/sqlite3ext.h:418:40: note: expanded from 
macro 'sqlite3_create_function'
    #define sqlite3_create_function        sqlite3_api->create_function
                                           ^
    
    
    Run

and "too many errors emitted".

I'm encouraged to be working against the correct source, but need to learn a 
bit more to understand these errors...

Reply via email to