How to integrate Ogre in Qt Creator?

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
SanchezPluz
Gnoblar
Posts: 8
Joined: Mon May 12, 2014 5:57 pm

How to integrate Ogre in Qt Creator?

Post by SanchezPluz »

Hello.
Qt installation manual on official website is outdated. How can I integrate Ogre in Qt + MinGW another way?
I want to build the engine without Qt widgets and classes, only the usual way like Visual Studio.

I wrote some code in .pro, but the project didn't run.

Code: Select all

TEMPLATE = app
TARGET = QtOgre

win32{
    OGRE = $(OGRE)
}

unix{
    # You may need to change this include directory
    INCLUDEPATH += /usr/include/OGRE
    CONFIG += link_pkgconfig
    PKGCONFIG += OGRE
}

CONFIG(debug, debug|release){
    #BINDIR = $$OGREHOME\\bin\\debug
    BINDIR = debug
}

CONFIG(release, debug|release){
    #BINDIR = $$OGREHOME\\bin\\release
    BINDIR = release
}

win32 {
    # You may need to change this include directory
    BOOSTDIR	    = E:\Programms\Ogre_MinGW\OgreSDK_MinGW_v1-8-1\boost # My boost dir, the project still includes the precompiled SDK Boost path.
    LIBS	    += -L$$OGRE\\boost\\\lib
    Release:LIBS    += -L$$OGRE\\lib\\release
    Debug:LIBS	    += -L$$OGRE\\lib\\debug
    INCLUDEPATH	    += $$OGRE\\include
    INCLUDEPATH	    += $$OGRE\\include\\OIS
    INCLUDEPATH	    += $$OGRE\\include\\OGRE
    INCLUDEPATH	    += $$OGRE\\boost
    INCLUDEPATH	    += $$BOOSTDIR
    INCLUDEPATH	    += .
    DESTDIR = $$BINDIR
    LIBS += -LE:\Programms\Ogre_MinGW\OgreSDK_MinGW_v1-8-1\boost\lib
}

CONFIG(debug, debug|release) {
    TARGET = $$join(TARGET,,,d)
    LIBS *= -lOgreMain_d -lOIS_d
    LIBS += -llibboost_system-mgw47-mt-d-1_51
}

SOURCES += \
    main.cpp
In main.cpp I called a pointer to RenderWindow. The project was compiled, but Qt wrote: "The program has unexpectedly finished".
With TutorialFramework the same situation.
What's wrong? :(
Post Reply