Eh bah... toujours pas ! :l
Je vois pas du tout le problème... Help please ?
mon .pro:
TEMPLATE = app
QT = sql widgets
TARGET = Teal
SOURCES += \
main.cpp \
teal_connex.cpp \
hl_sha1wrapper.cpp \
hl_sha1.cpp
HEADERS += \
teal_connex.h \
hl_sha1wrapper.h \
hl_sha1.h \
hl_hashwrapper.h \
hl_types.h
DEFINES += SFML_STATIC
INCLUDEPATH += C:/Qt/Qt5.2.1/5.2.1/mingw48_32/include/SFML/include
DEPENDPATH += C:/Qt/Qt5.2.1/5.2.1/mingw48_32/include/SFML/include
win32:CONFIG(debug, debug|release): LIBS += \ #
-LC:/Qt/Qt5.2.1/5.2.1/mingw48_32/include/SFML/lib/libsfml-graphics-s-d.a \ #
-LC:/Qt/Qt5.2.1/5.2.1/mingw48_32/include/SFML/lib/libsfml-window-s-d.a \ #
-LC:/Qt/Qt5.2.1/5.2.1/mingw48_32/include/SFML/lib/libsfml-system-s-d.a #
else:win32:CONFIG(release, debug|release): LIBS += \ #
C:/Qt/Qt5.2.1/5.2.1/mingw48_32/include/SFML/lib/libsfml-graphics-s.a \ #
C:/Qt/Qt5.2.1/5.2.1/mingw48_32/include/SFML/lib/libsfml-window-s.a \ #
C:/Qt/Qt5.2.1/5.2.1/mingw48_32/include/SFML/lib/libsfml-system-s.a #
mon main:
#include "teal_connex.h"
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>
int main(int argc, char *argv[])
{
Teal teal;
while (teal.isOpen())
{
sf::Event event;
while (teal.pollEvent(event))
{
if (event.type == sf::Event::Closed)
teal.Window::close();
}
teal.clear();
teal.display();
}
return 0;
}
mon début de .cpp et .h
//.cpp
Teal::Teal() : QWidget(), RenderWindow(VideoMode(400, 400), "Teal")
//.h
class Teal : public QWidget, public sf::RenderWindow
Et le compilo me sort 19 erreurs comme ça:
C:\Users\william\Projets\C++\newQt\Projects\dofus\Code\build-teal_v0-1-Desktop_Qt_5_2_1_MinGW_32bit-Debug\debug\main.o:-1: In function `Z5qMainiPPc':
C:\Users\william\Projets\C++\newQt\Projects\dofus\Code\teal_v0-1\main.cpp:15: erreur : undefined reference to `sf::Window::close()'
C:\Users\william\Projets\C++\newQt\Projects\dofus\Code\teal_v0-1\main.cpp:12: erreur : undefined reference to `sf::Window::pollEvent(sf::Event&)'
C:\Users\william\Projets\C++\newQt\Projects\dofus\Code\teal_v0-1\main.cpp:18: erreur : undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
C:\Users\william\Projets\C++\newQt\Projects\dofus\Code\teal_v0-1\main.cpp:18: erreur : undefined reference to `sf::RenderTarget::clear(sf::Color const&)'
etc...
C:\Users\william\Projets\C++\newQt\Projects\dofus\Code\build-teal_v0-1-Desktop_Qt_5_2_1_MinGW_32bit-Debug\debug\teal_connex.o:-1: In function `ZN4TealC2Ev':
C:\Users\william\Projets\C++\newQt\Projects\dofus\Code\teal_v0-1\teal_connex.cpp:5: erreur : undefined reference to `sf::String::String(char const*, std::locale const&)'
C:\Users\william\Projets\C++\newQt\Projects\dofus\Code\teal_v0-1\teal_connex.cpp:5: erreur : undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
C:\Users\william\Projets\C++\newQt\Projects\dofus\Code\teal_v0-1\teal_connex.cpp:5: erreur : undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'
C:\Users\william\Projets\C++\newQt\Projects\dofus\Code\teal_v0-1\teal_connex.cpp:5: erreur : undefined reference to `sf::RenderWindow::~RenderWindow()'
etc etc etc...
What's the problem ? o_o'