How to include SDL lib
-
wrote on 24 Mar 2014, 09:35 last edited by
Hi, Qt community.
I have some truble with icluding SDL lib in Qt 5.2.1.
Anybody do it?
In *.pro i write:
@
INCLUDEPATH += C:/SDL-1.2.15/include/SDL
LIBS += C:/SDL-1.2.15/lib -lSDLHEADERS +=
test.hSOURCES +=
test.cppQT += core gui
@
And when i compile it, I have three errors:
@
:-1: error: cannot find C:/SDL-1.2.15/lib: Permission denied
:-1: error: cannot find -lSDL
collect2.exe:-1: error: error: ld returned 1 exit status
@
What does it means?
Community help me pleas. -
Hi,
You are missing a -L before C:/SDL-1.2.15/lib
So it should be
@LIBS += -LC:/SDL-1.2.15/lib -lSDL@
-
wrote on 1 Apr 2014, 09:45 last edited by
Oh thanks, I don't know about it!
-
wrote on 1 Apr 2014, 11:01 last edited by
Thats great!
I write my projekt, hi is compilet, but don't started.
I think it is a problem with SDL lib, I del all my projekt and write simple program.
@
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>int main()
{
int a,b;
printf("vvedite a\n");
scanf("%d\n",&a);
printf("vvedite b\n");
scanf("%d\n",&b);
printf("%d\n",a+b);
}
@then I build it.
But when I started I have an error 0cx0000139. -
It means you are missing one or several dlls which I suspect are those from SDL. Go to the Project panel -> run and update the PATH variable adding the path to your SDL dlls. Then you should be good to go