This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

shared library - undefined symbols


Hi,

 I need to create a shared library and load it eventually.
 I created a "helo world" and succesfully loaded it (dlopen).

 Now in place of helo world, I need another library mem.so.
 I have created mem.so and tried to load it.Now an exception
 is thrown saying that certain symbols are undefined which are
 infact the base class names.

 It might sound trivial actually, but Why should it complain
 abt undefined symbols? 

 Please let me know if I am missing something.It is important for
 me to get through this immediately :-(

 -------------------------------------------

 Sample Code :

	class X : class baseX {
	...
	};

	class Y : class baseY {
	...
	};
//End of Code

 g++ -c -shared -o mem.so X.o Y.o

 ( This created mem.so )

 When used with dlopen as :

 handle = dlopen ("mem.so", RTLD_LAZY)
 
 The above statement throws error saying undefined reference to baseX
 and BaseY!	

-- 
Regards,
Anitha B,
Sankhya Technologies Private Limited.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]