[sane-devel] Re: Undefined symbols

Mohit Kumar Mohit Kumar <mohit.kumar@gmail.com>
Wed, 8 Jun 2005 10:58:29 +0530


Resending due to no response......

On 6/7/05, Mohit Kumar <mohit.kumar@gmail.com> wrote:
> Hi All,
>=20
> 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.
>=20
> 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.
>=20
> I have
>=20
> class CSane
> {
>     public:
>         static SANE_Handle handle;
> }
>=20
> When I dlopen() into this code, I get an error as undefined symbol
> CSane::handle.
>=20
> The way i make my .so is:
>=20
> gcc -shared -o libXYZSane.so a.o b.o c.o -lsane
>=20
> 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.
>=20
> Thanks,
> Mohit
>