Shared library problem

Hi all,

I don't know if this is really a c++ problem or not but I'm using c++ so I thought it was worth posting here to see if anyone has the same problem and, I hope, a solution :-)

I've created an application class that derives from a template singleton class.

The singleton template contains static methods for creating and accessing the singleton.

I created a shared library containing the application class aswell as other classes that access and use the application class ( using the static singleton access method )

I then created an .exe that uses the shared library. I create the singleton for my application in the main of the .exe and when I try to access the application class ( still using the static singleton access method ) it works fine.

However, the code that tries to access what should be the same singleton from the library doesn't work, it acts as if the singleton was NULL.

I know it comes from the fact that I'm using the shared library because when I don't use it everything works fine.

The weird thing is that the problem only occurs under Windows 7 ( eclipse - gcc ), the shared library works under linux ( ubuntu Karmic Koala - eclipse - gcc ).



Hope you can help.







Topic archived. No new replies allowed.