Hey,
As you may know I'm working on wxWidgets for Amiga. It's a C++ lib and can get pretty big, so making it shared is clearly desirable. OS 4 shared objects should be straightforward enough, but I'm wondering about normal resident libraries:
Has anyone done a resident C++ library before?
I'd be interested in experiences and sample code if possible. Both for ppc and m68k.
Are people using C++ on Amiga to any extent btw? Or is it still mainly C and other languages?
//A.
I have been working very much with c++ in making my Qt 4.7.0 port to os4. I have just used shared objects and no "normal" shared libraries. It seems to be hard to construct a shared library in c++ because you need to export both data and code. But I don't know... What exactly did you have in mind?
Ok, thanks. I think I've seen resident libs in C that make a separate copy of the data section for each caller, but I can't think of an example right now. Same strategy *should* work for C++ I guess, though I haven't tried.
Some other (potential) issues that come to mind are name mangling, abstract classes, virtual members, exceptions, etc. Someone mentioned templates, but I'm not sure that would be so much of an issue. I might give it a try later on, I'm just curious if there's any previous work in the area.
The Qt port would face a similar situation probably? Did you need to do anything special for AmigaOS shared objects, or did it work similar to other (read Linux) platforms?