I'm working on my game framework in C++. It is composed of a shared library containing all the features and an executable used to test the features (The executable will eventually become a working game).
The library and executable both compile and link fine, but when I try to execute it, I get this error:
main/bin/debug/main: symbol lookup error: main/bin/debug/main: undefined symbol: _ZN7Survive8Graphics4TwoD6SpriteC1Ev
Survive::Graphics::TwoD::Sprite is a sprite class for 2D images.
I'm wondering, what would cause this error?
Sprite and Graphics2D, a class used to draw to a given Sprite, are both defined in Sprite.hpp and implemented in their respective .cpp files. Could this be a cause of the problem?
Otherwise, what would cause this?
Thanks in advance!
"Welcome to the desert of the real." -- Morpheus, The Matrix.
Are you positive you've included all the appropriate .cpp modules in your shared library? Do you in fact have a definition for [font=courier new,courier,monospace]Survive::Graphics::TwoD::Sprite::Sprite()[/font] in the appropriate .cpp file?
Stephen M. Webb
Professional Free Software Developer
I'm on Ubuntu and I use the command line. I've been able to run the executable with the shared library before, and I haven't changed the locations of either, I just added the Sprite, Graphics2D, etc to the library. So the locations of the executable and the shared library aren't the problem.
"Welcome to the desert of the real." -- Morpheus, The Matrix.