Jump to content
  • Advertisement
Sign in to follow this  
WireAlbatross

Portability of inheriting from classes of a dynamic library

This topic is 3825 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm having link errors when subclassing a class of a dynamic library. I have this technique working in Windows. I'm in the middle of writing Mac OS X specific code, and I'm having trouble. Inside my core dynamic lib (.dylib) I have: class GraphicsWindow // An abstract interface class CocoaGraphicsWindow // An abstract base class (partially implements GraphicsWindow). I have a plugin ".bundle" which has OpenGLCocoaGraphicsWindow // Derives from CocoaGraphicsWindow (fully implements GraphicsWindow interface). The plugin links with the core dylib; however, CocoaGraphicsWindow's methods are not found so there are link errors. I'm quite sure symbols are exported from the core dylib because I am able to use other objects in it from the plugin. Is this not possible apart from Windows? I've messed around with __attribute__((visible("default")), and still no luck. I am aware of the limitations of exporting C++ symbols from dynamic libraries, and both the dylib and the plugin bundle are being compiled with the same version of g++. Any help is appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Sorry to reply to my own post, but I've figured out the issue. I just wanted to confirm that this is indeed possible. I just had an old library search path included, so I was trying to link to a two month old build of the core dylib. I love how it took me two days of pulling my hair out to finally realize this =).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!