Hey Ondrej,

There are flags for GCC that force export of ALL public symbols.  This should 
allow your .so to find the symbols in your main binary.  There may be another 
switch that forces the whole .a file to be linked in, not just the referenced 
(by your main binary) symbols.

Hope that's enough to get you going in the right direction.

Also, you are probably getting an error on dlopen(), so you should not be 
calling dlsym()…

:)

On Oct 4, 2011, at 10:51 PM, ondras wrote:

> Hi,
> 
> please forgive if this question is not directly related to V8 itself, but 
> rather to gcc/c++ usage.
> 
> My project (v8cgi) uses a main binary and several (loadable) modules. These 
> modules are implemented as shared libraries; both the main binary and modules 
> use V8.
> Under normal circumstances, I use a shared V8 library and everything works 
> cool.
> 
> One of v8cgi users recently suggested if it would be possible to use a static 
> build of libv8. I tried that and failed: having V8 linked to both the main 
> binary *and* all the modules seems to crash badly (segfault) when I dlsym() 
> the first external module.
> 
> 1) is the static V8 the reason why the scenario described above segfaults?
> 2) how can I avoid this? Is it actually possible to use static V8 from within 
> those loadable modules?
> 
> 
> Thanks,
> Ondrej Zara
> 
> 
> -- 
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to