Quote:
I really don't think you can make one member of a class be exported from the code into the library, and the rest exported from the library to the code.
Yep, that's why I want to take the base class cpp file (which has the static menber) out of the library since it's also in the main app.
Here's how it's set up: In the project I have a base class header and cpp. In the library I have a subclass header and cpp. The library also includes the base class header. It doesn't have the base class definition, which I want to be resolved when the library is loaded in.
Earlier, I was adding in the base class cpp to the library (plus whatever else it needed). But I did some research and it seems I don't need to include all those definitions in both. As one site puts it:
(Sorry, I have to mangle this url because I'm not allowed to post links yet)
www
.informit.
com/articles
/article.aspx?p=22435&rll=1:
Quote:
A shared library may also contain references to functions and variables that aren't themselves defined in the shared library
...
If your main executable exports any dynamic symbols (as if it were a shared library), these symbols may be used.
Since I took unnecessary definitions outside of the library the library hasn't even been loading. If I can get it to load, I am hoping that static member won't be duplicated.
Edit: Just to make sure we're using the same terms: by definition I mean cpp and by declaration I mean header.