Operating System: window 10
Render System: DirectX 9,DirectX 11
Hi.
I decided to upgrade my project to the latest version of Ogre(from 1.10). So far everything works fine, exept one thing: I read on this forum, OIS is a dead end (and I can't build it for x64 for some reason) I decided to rewrite my control system with Ogrebites.
When I add the "public OgreBites::InputListener" to the class , I get a lot of unresolved external symbol error messages
I followed this tutorial for first:
https://ogrecave.github.io/ogre/api/latest/setup.html
then I searched up and down the whole internet, also tried to figure out from the samples, but soo far, no success.
I use a separated class for this purpose called "controlroom":
Controlroom.h
Code: Select all
#include <cmath>
#include<iostream>
#include <Ogre.h>
//#include <OISEvents.h>
//#include <OISInputManager.h>
//#include <OISKeyboard.h>
//#include <OISMouse.h>
#include "Bluedata.h"
#include <boost/bind.hpp>
#include "Raycast.h"
//#include <OgreBitesPrerequisites.h>//uncomenting this won't change the result
//#include <OgreInput.h>//uncomenting this won't change the result
#include <OgreApplicationContext.h>
class Controlroom : public OgreBites::ApplicationContext, public OgreBites::InputListener
{
private:
public:
Controlroom() ;
~Controlroom();
virtual bool keyPressed( const OgreBites::KeyboardEvent& evt );
virtual bool keyReleased( const OgreBites::KeyboardEvent& evt );
virtual bool mouseMoved(const OgreBites::MouseMotionEvent& evt );
virtual bool mouseWheelRolled(const OgreBites::MouseWheelEvent& evt);
virtual bool mousePressed( const OgreBites::MouseButtonEvent& evt);
virtual bool mouseReleased( const OgreBites::MouseButtonEvent& evt);
};
Code: Select all
Controlroom::Controlroom():mShutDown(false) , OgreBites::ApplicationContext("OgreTutorialApp")
{
OgreBites::ApplicationContext::setup();
// register for input events
addInputListener(this);
}
Controlroom::~Controlroom()
{
}
bool Controlroom:: keyPressed( const OgreBites::KeyboardEvent& evt )
{
int k = evt.keysym.sym;
}
bool Controlroom::keyReleased( const OgreBites::KeyboardEvent& evt )
{
int k = evt.keysym.sym;
}
bool Controlroom::mouseMoved(const OgreBites::MouseMotionEvent& evt )
{
if (!ismousexlocked) exmousex = evt.x;
if (!ismouseylocked) exmousey = evt.y;
}
bool Controlroom::mouseWheelRolled(const OgreBites::MouseWheelEvent& evt)
{
wheelval = evt.y / 120;
}
bool Controlroom::mousePressed( const OgreBites::MouseButtonEvent& evt)
{
rawmousecode = evt.button;
}
bool Controlroom::mouseReleased( const OgreBites::MouseButtonEvent& evt)
{
rawmousecode = evt.button;
}
Code: Select all
Severity Code Description Path File Line Suppression State
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: __cdecl OgreBites::ApplicationContextSDL::ApplicationContextSDL(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0ApplicationContextSDL@OgreBites@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
Severity Code Description Path File Line Suppression State
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl OgreBites::ApplicationContextBase::setup(void)" (__imp_?setup@ApplicationContextBase@OgreBites@@UEAAXXZ
Severity Code Description Path File Line Suppression State
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl OgreBites::ApplicationContextBase::frameRenderingQueued(struct Ogre::FrameEvent const &)" (__imp_?frameRenderingQueued@ApplicationContextBase@OgreBites@@UEAA_NAEBUFrameEvent@Ogre@@@Z)
Interestingly everything else works fine, and (I think) I linked all the necessary resources.
Edit:
If I write "OgreBites::MouseButtonEvent" or "public OgreBites::MouseMotionEvent" there, it not give me the unresolved error.