[sane-devel] Undefined symbols

Mohit Kumar Mohit Kumar <mohit.kumar@gmail.com>
Tue, 7 Jun 2005 17:45:42 +0530


Hi All,

I don't know whether this is the correct mailing list or not, but
thought the developers here would be able to help me out with the
small thing that I am missing.

I am trying to write a dynamic library (.so) which contains my SANE
code and my application would do a dlopen() into this library.
However, I get undefined symbols for all my SANE type members of the
class CSane. For eg.

I have=20

class CSane
{
     public:
         static SANE_Handle handle;
}

When I dlopen() into this code, I get an error as undefined symbol
CSane::handle.

The way i make my .so is:

gcc -shared -o libXYZSane.so a.o b.o c.o -lsane

Any help in this regard would be helpful. Also if you feel you are
aware of a proper alias which would be able to address the issue, feel
free to forward this mail.

Thanks,
Mohit