chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Compiling a shared library from swig interface


From: Thomas Chust
Subject: Re: [Chicken-users] Compiling a shared library from swig interface
Date: Sat, 22 Oct 2016 15:24:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 2016-10-22 13:16, spalis wrote:
> [...]
> Error: (load) unable to load compiled module - ./example.so: undefined 
> symbol: _ZTV6Square: "./example.so"
> [...]

Hello,

well, binutils tells us that

$ c++filt _ZTV6Square
vtable for Square

So the shared object you built apparently does not link correctly
against the C++ backend code you want to wrap.

You may have to add some linker flags to the CHICKEN compiler command
line to pull in necessary external libraries. You may also want to pass
the --no-undefined option to the GNU linker when building the shared
object (using csc ... -L -Wl,--no-undefined ...), which will instruct
the linker to report this kind of error rather than deferring its
detection to runtime :-)

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]