Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Linking SFML with Qt  (Read 2846 times)

0 Members and 1 Guest are viewing this topic.

aratnon

  • Newbie
  • *
  • Posts: 24
    • View Profile
Linking SFML with Qt
« on: November 07, 2013, 06:38:46 pm »
I can't run Qt program after it's linked with SFML.
It says "The program has unexpectedly finished".

This is my .pro file.

#-------------------------------------------------
#
# Project created by QtCreator 2013-11-07T22:13:54
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = MapEditor
TEMPLATE = app


CONFIG(release, debug|release): LIBS += -LE:/SFML21/lib -lsfml-audio -lsfml-graphics -lsfml-network -lsfml-window -lsfml-system
CONFIG(debug, debug|release): LIBS += -LE:/SFML21/lib -lsfml-audio-d -lsfml-graphics-d -lsfml-network-d -lsfml-window-d -lsfml-system-d

INCLUDEPATH += E:/SFML21/include
DEPENDPATH += E:/SFML21/include

SOURCES += main.cpp\
        mainwindow.cpp

HEADERS  += mainwindow.h

FORMS    += mainwindow.ui

Am I do something wrong?
I use Qt 5.1.0 32 bit Visual Studio 2012 and SFML 2.1

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Linking SFML with Qt
« Reply #1 on: November 07, 2013, 08:09:08 pm »
Use your debugger to find out more about the crash.
Laurent Gomila - SFML developer

aratnon

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Linking SFML with Qt
« Reply #2 on: November 08, 2013, 06:49:35 am »
I forget to put .dll file in my project now it already works.  :D

aratnon

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Linking SFML with Qt
« Reply #3 on: November 08, 2013, 07:40:10 am »
Another question, can I render SFML inside Qt window? or I have to separate them.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Linking SFML with Qt
« Reply #4 on: November 08, 2013, 08:24:46 am »
Yes you can. A quick search on this forum should give you all you need to get started.
Laurent Gomila - SFML developer