Just installed SDL2 in linux opensuse, and tried to make a shared library project in…
Jump to turn (7)
- 1Just installed SDL2 in linux opensuse, and tried to make a shared library projec
- 2Ok about your suggestions !) I checked and /usr/include/SDL2 exists libSDL2.so i
- 3ok I found out that when I try to add a new class it gives me the previous error
- 4I created a new project using the SDL2 template and it compiles correctly, so I
- 5I just create the class and not doing anything and I got that error, I haven't e
- 6ok I checked the build log and got more info on the error: usr/lib64/gcc/x8664-s
- 7that did in fact work, what is this -fPIC flag about and why it solved this prob
- User
Just installed SDL2 in linux opensuse, and tried to make a shared library project in codeblocks, I used this:
My sdl2-config --cflags --libs output is: -I/usr/include/SDL2 -D_REENTRANT -L/usr/lib64 -lSDL2
So I added I/usr/include/SDL2 to the build options -> search directory -> compiler and /usr/lib64 to the build options -> search directory -> linker
and -lSDL2 to build options -> linker settings -> other linker options
then I tried to compile it and give me this error:
error: ld returned 1 exit status Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
How can I fix it?
- Assistant