I have an header file :
Code: Select all
#ifndef OIS_FRAMEWORK_HPP
#define OIS_FRAMEWORK_HPP
#include <OISEvents.h>
#include <OISInputManager.h>
#include <OISKeyboard.h>
#include <OISMouse.h>
class OISFramework : public OIS::KeyListener, public OIS::MouseListener
{
public:
OISFramework();
~OISFramework();
bool keyPressed( const OIS::KeyEvent &arg );
bool keyReleased( const OIS::KeyEvent &arg ) ;
bool mouseMoved( const OIS::MouseEvent &arg );
bool mousePressed( const OIS::MouseEvent &arg, OIS::MouseButtonID id );
bool mouseReleased( const OIS::MouseEvent &arg, OIS::MouseButtonID id );
};
#endif
Code: Select all
#include "headers/OISFramework.hpp"
OISFramework::OISFramework()
{
//
}
When I compil, I got this error :
Code: Select all
Linking CXX executable dist/bin/App
CMakeFiles/App.dir/OISFramework.cpp.o: In function `OISFramework':
/home/user/version/1201/OISFramework.cpp:3: undefined reference to `vtable for OISFramework'
/home/user/version/1201/OISFramework.cpp:3: undefined reference to `vtable for OISFramework'
collect2: ld a retourné 1 code d'état d'exécution
make[2]: *** [dist/bin/App] Erreur 1
make[1]: *** [CMakeFiles/App.dir/all] Erreur 2
make: *** [all] Erreur 2
I really don't understand why, so I thought since almost all Ogre users are using OIS, maybe you can help me.