About Store Forum Documentation Contact
Donations:
140$/mo



Post Reply 
working with esenthel in QtCreator
Author Message
rndbit Offline
Member

Post: #1
working with esenthel in QtCreator
In case anyone wants to use QtCreator as IDE i cooked basic .pro file for qmake that builds esenthel app. Note that this .pro file is msvc compiler specific. It also supports precompiled headers.
It implements following folder structure:
Code:
MainFolder
|--bin
|     |--debug
|     |--release
|--obj
|     |--YourGame
|              |--debug
|              |--release
|--src
|     |--YourGame
|                |--stdafx.h
|                |--main.cpp
|--data
       |--engine.pak and others
if someone does not like the folder structure you can change it with little effort in pro file.

and here is the candy:
Code:
TARGET_NAME = YourGame
TEMPLATE = app
CONFIG += windows precompile_header
CONFIG -= qt

PRECOMPILED_HEADER = stdafx.h

SOURCES += \
    stdafx.cpp \
    main.cpp

HEADERS += \
    stdafx.h

DEFINES += _UNICODE

INCLUDEPATH += ../../data/enum

CONFIG(debug, debug|release) {
    DESTDIR = ../../bin/debug
    TARGET = $${TARGET_NAME}_d
    OBJECTS_DIR = ../../obj/$${TARGET_NAME}/debug
    DEFINES += DEBUG
}

CONFIG(release, debug|release) {
    DESTDIR = ../../bin/release
    TARGET = myapp
    OBJECTS_DIR = ../../obj/$${TARGET_NAME}/release
    DEFINES += RELEASE
}

QMAKE_CXXFLAGS += -MD
QMAKE_CXXFLAGS += -Zc:wchar_t
QMAKE_LFLAGS_DEBUG += /NODEFAULTLIB:LIBCMT.lib

LIBS +=    winmm.lib \
        wininet.lib \
        ws2_32.lib \
        imm32.lib \
        psapi.lib \
        rpcrt4.lib \
        version.lib \
        kernel32.lib \
        user32.lib \
        gdi32.lib \
        winspool.lib \
        comdlg32.lib \
        advapi32.lib \
        shell32.lib \
        ole32.lib \
        oleaut32.lib \
        uuid.lib \
        odbc32.lib \
        odbccp32.lib \
        EsenthelEngineDX10+.lib

precompile_header:!isEmpty(PRECOMPILED_HEADER)
{
    DEFINES += USING_PCH
}

Happy coding!
(This post was last modified: 01-03-2012 10:51 AM by rndbit.)
01-03-2012 10:50 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: working with esenthel in QtCreator
Thanks for sharing!
01-03-2012 04:07 PM
Find all posts by this user Quote this message in a reply
DimaKirk Offline
Member

Post: #3
RE: working with esenthel in QtCreator
For MacOSX
Code:
TARGET_NAME = YourGame
TEMPLATE = app
LANGUAGE  = C++
CONFIG += precompile_header
CONFIG -= qt


QMAKE_CXXFLAGS += -MD -fshort-wchar -ffriend-injection
QMAKE_LFLAGS += -framework SystemConfiguration -framework Carbon -framework Cocoa -framework OpenGL -framework OpenAL -framework Cg -lz -liodbc


PRECOMPILED_HEADER = stdafx.h

SOURCES += \
    main.cpp \

DEFINES += _UNICODE

INCLUDEPATH += ../../EsenthelEngineSDK/Installation/EsenthelEngine




CONFIG(debug, debug|release) {
    DESTDIR = ../../bin/debug
    TARGET = $${TARGET_NAME}_d
    OBJECTS_DIR = ../../obj/$${TARGET_NAME}/debug
    DEFINES += DEBUG
}

CONFIG(release, debug|release) {
    DESTDIR = ../../bin/release
    TARGET = myapp
    OBJECTS_DIR = ../../obj/$${TARGET_NAME}/release
    DEFINES += RELEASE
}

LIBS += ../../EsenthelEngineSDK/Installation/EsenthelEngine.a \

precompile_header:!isEmpty(PRECOMPILED_HEADER)
{
    DEFINES += USING_PCH
}

HEADERS += \
    stdafx.h
(This post was last modified: 09-16-2012 10:00 AM by DimaKirk.)
09-16-2012 09:59 AM
Find all posts by this user Quote this message in a reply
Post Reply