Libraries Conflict, SDL and Qt
-
Hi,
I tried to use SDL to access my joystick and use Qt for GUI. However, I got this error when I compile the code.
SDLmain.lib(SDL_win32_main.obj):-1: error: LNK2005: _WinMain@16 already defined in qtmaind.lib(qtmain_win.obj)
I am using Qt 5.1.0 and SDL 1.2.15
Thank you
@
QT += core guigreaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = joystick_GUI
TEMPLATE = appLIBS += -L"C:/libs/SDL-1.2.15/lib/x86" -lSDL -lSDLmain
INCLUDEPATH += C:/libs/SDL-1.2.15/include
SOURCES += main.cpp
joystick_gui.cpp
joystick.cppHEADERS += joystick_gui.h
joystick.hFORMS += joystick_gui.ui
@ -
Hi, I am not familiar with SDL, but you can give a try to add following lines to your pro file, then run qmake
@
CONFIG-=windows
QMAKE_LFLAGS += $$QMAKE_LFLAGS_WINDOWS
@ -
Ok, I write a blog right now.
http://blog.debao.me/2013/07/link-confilict-between-sdl-and-qt-under-windows/
hope it's useful for you.