Ogre3d LINK2019 error

Problems building or running the engine, queries about how to use features etc.
Post Reply
Thamriel
Gnoblar
Posts: 2
Joined: Thu Oct 19, 2017 9:15 pm

Ogre3d LINK2019 error

Post by Thamriel »

Hello,

I am new in Ogre3d. I try to compile my first project and I got this error.

>main.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: void __cdecl Ogre::Overlay::show(void)" (__imp_?show@Overlay@Ogre@@QEAAXXZ) référencé dans la fonction "public: virtual void __cdecl ExampleFrameListener::showDebugOverlay(bool)" (?showDebugOverlay@ExampleFrameListener@@UEAAX_N@Z)
1>main.obj : error LNK2019: symbole externe non résolu "__declspec(dllimport) public: void __cdecl Ogre::Overlay::hide(void)" (__imp_?hide@Overlay@Ogre@@QEAAXXZ) référencé dans la fonction "public: virtual void __cdecl ExampleFrameListener::showDebugOverlay(bool)" (?showDebugOverlay@ExampleFrameListener@@UEAAX_N@Z)
...

I use VS2017 and Ogre3d version OGRE-SDK-1.9.0-vc140-x64-12.03.2016

My code for main.cpp
#include <Ogre.h>
#include "PremiereApplication.h"
#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
#else
int main(int argc, char **argv)
#endif
{
PremiereApplication app;
try {
app.go();
}
catch (Ogre::Exception& e) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBoxA(NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
fprintf(stderr, "An exception has occurred: %s\n",


and PremiereApplication.h


#include "ExampleApplication.h"
class PremiereApplication : public ExampleApplication
{
public:
void createScene()
{
}
};

Can someone help me ?

Thanks in advance
User avatar
Kohedlo
Orc
Posts: 435
Joined: Fri Nov 27, 2009 3:34 pm
Location: Ukraine, Sumy
x 32
Contact:

Re: Ogre3d LINK2019 error

Post by Kohedlo »

you need add to link ogreOverlay.dll lib, that is not part of OgreMain.dll.

compilee this first lib.
add in compiler dir patch.

and paste in nonclass codespace function

Code: Select all

#pragma comment(lib, "OgreOverlay.lib") 
and demo link succesfully. :D
c++ game developer.
current project: Imperial Game Engine 2.5
Image
Thamriel
Gnoblar
Posts: 2
Joined: Thu Oct 19, 2017 9:15 pm

Re: Ogre3d LINK2019 error

Post by Thamriel »

Hello Kohedlo.

I will try that.
Thank you very much. I appreciate your help.
Best regards
Post Reply