Make sure that libsane.so is available to Trydll.out during run-time. Does your LD_LIBRARY_PATH have the location of libsane.so? On 6/8/05, Mohit Kumar <mohit.kumar@xxxxxxxxx> wrote: > Hi All, > > I am not aware if this is the correct mailing list to put this > question at, but guess it could be a starting point. If you feel there > is a relevant mailing list for this question, I request you to forward > it to the proper mailing list. > > I have a self made shared library libXYZ.so which inturn has > references to libsane.so. > > I need to dlopen into libXYZ.so. To resolve dependency on libsane.so, > my program say Trydll.out is bult with -lsane option (for libsane.so). > However I get an unresolved symbol for all variable of types defined > in libsane.so. > > To be exact, > > libXYZ.so has declarations like: > class CSane > { > public: > static SANE_Handle handle; //SANE_Handle is got from libsane.so > } > > in Trydll.cpp i have written > > int main(void) > { > void * lib_handle = ("path of libXYZ.so",RTLD_LAZY); > } > > This returns me null saying undefined symbol to CSane::handle. > > What am I doing wrong here? Any help would be higle appreciable. > > Thanks, > Mohit >