Compiler error with SDL2 (Help with adding libraries)
Posted: Sat Aug 11, 2018 1:58 am
Hey, wondering if someone could help me out, I am trying to add SDL2 and having problems. In my project folder I have a folder called deps and in deps I have an include folder with all my h files seperated into GL and SDL folders and I added this to "Compiler include paths" as "deps/include/" (without the quotes). Then there is also a folder called lib contianing .lib files added to "Linker Library search paths" as "deps/lib/" and in "Linker Libraries" I have added "SDL2.lib;SDL2main.lib;glew32.lib". I also have SDL2.dll in my Debug folder
In my main.cpp file I have just have a basic test
When I run this I get the following error stating that the lib files can not be found
Have I not set my paths up correctly or is there an option I havn't set? I thought maybe the issue could of been with reletive paths, I know in Visual Studio you would set the start of your path as ($SolutionDir) so I tried using that just to see if it would work and I also tried changing the paths to the full path as "C:/Users/EldritchCode/workspace/CodeLiteProjects/SDLworkspace/SDLproject/deps/include{and}lib" and get the same error.
I am running CodeLite 12.0.0 on windows 8.1 and I have installed MinGW and updated it to I believe the latest version through mingw-get.exe, I had previously tried running it on an older version and thought tht might of been an issue, I have also tried using the TDM version that you can download through CodeLite. I am also using SDL 2.0.0
In my main.cpp file I have just have a basic test
Code: Select all
#include <SDL/SDL.h>
int main(int argc, char** argv)
{
SDL_Init(SDL_INIT_EVERYTHING);
return 0;
}
Code: Select all
C:\Windows\system32\cmd.exe /C C:/MinGW/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f Makefile
"----------Building project:[ SDLproject - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'C:/Users/EldritchCode/workspace/CodeLiteProjects/SDLworkspace/SDLproject'
C:/MinGW/bin/g++.exe -o ./Debug/SDLproject @"SDLproject.txt" -L. -Ldeps/lib/ -lSDL2.lib -lSDL2main.lib -lglew32.lib
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lSDL2.lib
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lSDL2main.lib
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lglew32.lib
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[1]: *** [Debug/SDLproject] Error 1
SDLproject.mk:78: recipe for target 'Debug/SDLproject' failed
mingw32-make.exe: *** [All] Error 2
mingw32-make.exe[1]: Leaving directory 'C:/Users/EldritchCode/workspace/CodeLiteProjects/SDLworkspace/SDLproject'
Makefile:4: recipe for target 'All' failed
====1 errors, 0 warnings====
I am running CodeLite 12.0.0 on windows 8.1 and I have installed MinGW and updated it to I believe the latest version through mingw-get.exe, I had previously tried running it on an older version and thought tht might of been an issue, I have also tried using the TDM version that you can download through CodeLite. I am also using SDL 2.0.0