Any idea how to link them?

Begin forwarded message:

From: Daniele Chiaranza <danic84@hotmail.it>
Date: May 23, 2012 11:49:49 AM GMT+02:00
To: Ralf Mueller <ralf.mueller@zmaw.de>
Subject: Re: [Swig-user] swig and opencv

These are the overall calls:

swig2.0 -c++ -ruby sdk.i
g++ -c sdk.cpp
g++ -c sdk_wrap.cxx -I ~/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1
g++ -shared -flat_namespace -undefined /usr/local/lib/libinsight.so sdk.o sdk_wrap.o -o sdk.so
ln sdk.so ~/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/sdk.so

I link the static openCV library like this:

#include "opencv/cv.h"
#include "opencv/highgui.h"

in a file header.h that i link in the sdk.cpp:

#include "header.h"

Cheers,
Daniele


On May 23, 2012, at 11:22 AM, Ralf Mueller wrote:

On 05/23/2012 10:13 AM, Daniele Chiaranza wrote:
1)  U _ZN2cv12VideoCapture4openERKSs
Fine, or at least, that's what I expected ;-)

2) The error that i get is not compiling, but on web browser when i call the controller which model requires the swig module.
The please send me the call, which created sdk.so. A missing symbol should cause a linking error.

3)That's the result of ldd command
linux-gate.so.1 =>   (0xb7764000)
libstdc++.so.6 =>  /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb765d000)
libgcc_s.so.1 =>  /lib/i386-linux-gnu/libgcc_s.so.1 (0xb763f000)
libc.so.6 =>  /lib/i386-linux-gnu/libc.so.6 (0xb7499000)
libm.so.6 =>  /lib/i386-linux-gnu/libm.so.6 (0xb746d000)
/lib/ld-linux.so.2 (0xb7765000)

The opencv library is missing here. do you use a static version of opencv? again, the linking call is essential to understand the error.

regards
ralf