Any idea how to link them?

Begin forwarded message:

From: Daniele Chiaranza <>
Date: May 23, 2012 11:49:49 AM GMT+02:00
To: Ralf Mueller <>
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/ sdk.o sdk_wrap.o -o
ln ~/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/

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"


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 A missing symbol should cause a linking error.

3)That's the result of ldd command =>   (0xb7764000) =>  /usr/lib/i386-linux-gnu/ (0xb765d000) =>  /lib/i386-linux-gnu/ (0xb763f000) =>  /lib/i386-linux-gnu/ (0xb7499000) =>  /lib/i386-linux-gnu/ (0xb746d000)
/lib/ (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.