shared libraries - C compiler errors during otherwise successful build -


i made library link frontend i'm working on. library isn't complete, it's done enough start testing i've got.

here function in frontend far:

int main(string[] args) {     try     {         mcth.init_lists();         mcth.init_names();     } catch (fileerror e) {         stderr.printf("error: %s\n", e.message);     }      // no errors     return 0; } 

as far can tell, it's valid syntax library (the error , methods defined in vapi). however, when go build, errors in c compiler:

valac src/main.vala -o bin/mctradehelp --pkg mctradehelp --pkg libxml-2.0 /tmp/ccdiz2sn.o: in function `_vala_main': main.vala.c:(.text+0x27): undefined reference `mcth_init_lists' main.vala.c:(.text+0x3f): undefined reference `file_error_quark' main.vala.c:(.text+0x11a): undefined reference `mcth_init_names' collect2: error: ld returned 1 exit status error: cc exited status 256 

the vapi located @ /usr/share/vala/vapi, header in /usr/local/include, , .so in /usr/local/lib.

am passing wrong flags, or not in right place?

vala passes compile , link arguments c compiler each package using matching pkg-config data (/usr/local/lib/pkgconfig/mctradehelp.pc in case). if file doesn't exist, won't pass args. can pass them manually using -x -lmctradehelp.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -