Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QT & SDL
dan369 last edited by
Well i really do like using the Qt creator. Defiantly one of the best IDEs out there. But im slightly unsure on how i'd set it up with using SDL. Currently i have this set-up in my .pro file;
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
INCLUDEPATH += "C:\SDL\SDL-1.2.14\include"
LIBS += -L"C:\SDL\SDL-1.2.14\lib" \ -lSDL \ -lSDLmain
That seems fine to me, however when then attempting to build a basic SDL program (Just Initializing & Quitting SDL), i get the following linker errors;
Im totally clueless as to what the first error message means. And the seconded error message suggest that i'm linking in SDL wrong..
So im wondering what am i actually doing wrong?
Any help greatly appreciated! :)
Which version of MSVC was SDL compiled with, and what do you use to compile your project?
dan369 last edited by
[quote author="sierdzio" date="1355990925"]Which version of MSVC was SDL compiled with, and what do you use to compile your project?[/quote]
Well ive been using sdl 1.2.14, since sdl's current version is 1.2.15, i cant actually remember off by heart what version of msvc my version uses... could be visual c++ 5.
I use msvc 2010 for my project.
I'm now actually using SDL 1.2.15. Might as-well update to the latest version. Nothing has changed however :/, same linker errors present as in the image.
So i have things building :), thats the good news. Now, its more of a curiosity. SDL for some reason doesn't like having an empty main(). So the first two errors reference an "unreferenced formal parameter". Im guessing thats nothing to worry about?
But the other two errors still consist of a confliction;
defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
Just wondering what that actually is now? And if it should be something i should worry about?
Image of the warnings;
First two warnings are not that important, you can ignore them or use Q_UNUSED macro to get rid od the warning.
The conflict - I do no know this error. Still seems to be there might be a clash between different MSVC versions, but if the code works, then it's probably OK.