Linking external library

12 views
Skip to first unread message

Sergey

unread,
Nov 16, 2009, 3:01:33 PM11/16/09
to nixysa-users
I am new to nixysa, so apologized for the question beforehand.

I have a codebase that already implements the functions that I need -
it is basically bunch of c-files filled with functions. I compile each
of them using SharedObject builder and link them to your helloworld
example, so Sconstruct looks like that:

SUBMIT_SRC = ['1.c','2.c']
SUBMIT_SRC = ['submit/%s' % f for f in SUBMIT_SRC]
SUBMIT = SharedObject(SUBMIT_SRC,CCFLAGS=submit_defs)
.....................................................
env.SharedLibrary('helloworld', AUTOGEN_CC_FILES + SOURCES +
['$STATIC_GLUE_DIR/' + f for f in
STATIC_GLUE_SOURCES] + SUBMIT)

That obviously generates object files and links them in.

Assuming that i want to call function Init() that is in one of the
precompiled objects:

std::string HelloWorld::GetHw(){
if(Init())
return "OK";
}

When I call the function from JS, firefox crashes with undefined
symbol: _Z4Initv

How so I let the plugin know that the function is compiled in - is it
done through idl??

Thanks in advance.
Reply all
Reply to author
Forward
0 new messages