C++ shared libs?

3 posts / 0 new
Last post
andst
andst's picture
Offline
Last seen: 9 years 8 months ago
Joined: 2012-12-05 21:33
C++ shared libs?
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.
alfkil
alfkil's picture
Offline
Last seen: 1 year 1 week ago
Joined: 2011-05-10 22:02
I have been working very much
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?
andst
andst's picture
Offline
Last seen: 9 years 8 months ago
Joined: 2012-12-05 21:33
Ok, thanks. I think I've
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?
Log in or register to post comments