Dynamic Linking to C++ vtable
Posted: Sun Aug 14, 2005 2:59 pm
Let me first give brief information about my os:
My operating system is a full multiprocess multithread filesystem gui everything included filesystem, i have implemented the standard c headers. it can load and run every standard c ( example = nasm ) program.
my os supports dynamic linking against library files, the structure is basically similar with windows, library file exports some addresses ( with a special format ) and loader file imports something and os connects them together.
upto here everthing is good: i can very succesfully dynamically link "C" methods and variables.
my problem is:
>>> i cannot link a "C++" class and its member functions especially virtual methods and vtable of the class <<<
what i want is this: the executable file should only use the header file of the class, should be able to be linked to their methods, and the library file should have the methods and vtable of the class. and the executable should be able to override the virtual methods of the class.
this is not directly an os problem but i hope someone can give me some advise...
thanks.
My operating system is a full multiprocess multithread filesystem gui everything included filesystem, i have implemented the standard c headers. it can load and run every standard c ( example = nasm ) program.
my os supports dynamic linking against library files, the structure is basically similar with windows, library file exports some addresses ( with a special format ) and loader file imports something and os connects them together.
upto here everthing is good: i can very succesfully dynamically link "C" methods and variables.
my problem is:
>>> i cannot link a "C++" class and its member functions especially virtual methods and vtable of the class <<<
what i want is this: the executable file should only use the header file of the class, should be able to be linked to their methods, and the library file should have the methods and vtable of the class. and the executable should be able to override the virtual methods of the class.
this is not directly an os problem but i hope someone can give me some advise...
thanks.