AlphaWolf
10th February 2009, 00:39
I am using Qt Creator and want to link against different libs in debug mode.
This is my .pro file:
# -------------------------------------------------
# Project created by QtCreator 2009-02-06T01:28:15
# -------------------------------------------------
TARGET = uglyviewer
TEMPLATE = app
UI_DIR = tmp
MOC_DIR = tmp
INCLUDEPATH += C:\\OgreSDK\\include
SOURCES += src/uglyviewer.cpp \
src/main.cpp \
src/ogrewidget.cpp \
src/ogremanager.cpp \
src/inputmanager.cpp
HEADERS += src/uglyviewer.h \
src/ogrewidget.h \
src/singleton.h \
src/ogremanager.h \
src/inputmanager.h
FORMS += ui/uglyviewer.ui
RESOURCES += res/resource.qrc
RC_FILE = res/app.rc
debug {
OBJECTS_DIR = tmp/debug/
RCC_DIR = tmp/debug/
LIBS = -L%OGRE_HOME%\bin\debug -lOIS_d -lOgreMain_d
}
release {
OBJECTS_DIR = tmp/release/
RCC_DIR = tmp/release/
LIBS = -L%OGRE_HOME%\bin\release -lOIS -lOgreMain
}
The problem is that release overwrites debug because the Qt Creator always adds an debug_and_release to the CONFIG and therefore both debug and release are always definded.
This is my .pro file:
# -------------------------------------------------
# Project created by QtCreator 2009-02-06T01:28:15
# -------------------------------------------------
TARGET = uglyviewer
TEMPLATE = app
UI_DIR = tmp
MOC_DIR = tmp
INCLUDEPATH += C:\\OgreSDK\\include
SOURCES += src/uglyviewer.cpp \
src/main.cpp \
src/ogrewidget.cpp \
src/ogremanager.cpp \
src/inputmanager.cpp
HEADERS += src/uglyviewer.h \
src/ogrewidget.h \
src/singleton.h \
src/ogremanager.h \
src/inputmanager.h
FORMS += ui/uglyviewer.ui
RESOURCES += res/resource.qrc
RC_FILE = res/app.rc
debug {
OBJECTS_DIR = tmp/debug/
RCC_DIR = tmp/debug/
LIBS = -L%OGRE_HOME%\bin\debug -lOIS_d -lOgreMain_d
}
release {
OBJECTS_DIR = tmp/release/
RCC_DIR = tmp/release/
LIBS = -L%OGRE_HOME%\bin\release -lOIS -lOgreMain
}
The problem is that release overwrites debug because the Qt Creator always adds an debug_and_release to the CONFIG and therefore both debug and release are always definded.