I’m getting a LNK1181 compiler error it’s saying it can’t find the SDL2.lib but my SDL2.lib file in is in the right place SDL-2.30.7/lib/ there is two folders in lib x86 and x64 and in the options I have it for x86 but it’s saying it can’t find SDL2.lib
My guess is that you have not linked the libs into your project yet, or that they don’t have the full path. Follow the instructions found here:
Lazyfoo’s Visual Studio Instructions
The instructions should work for most versions of Visual Studio. (Skip to step 6 for the library linking instructions).
It is advisable to move the libraries to your debug and solutions folders to make shipping the project easier.
I also find this stack overflow post to be helpful : C++ Linking libs in Visual Studio
Just followed lazfoo’s entire guide twice and made sure everything is right and I have all the same stuff but I am getting a cannot open SDL.h error I can’t post two pictures but here are the options
and for the linker I have the SDL2.lib; SDL2main.lib
I don’t own a Windows machine to test this, but under “Include Directories” and “Library Directories” it says your libs and header files are on OneDrive? I don’t understand, isn’t that cloud storage? I’m pretty sure Visual Studios and Windows need those files to be present on the hard drive in order to link properly.
Yeah cause my desktop in on onedrive but I just moved sdl to my c folder and still the same error is happening
I also updated the environment variable and same thing
do you have discord or something so I can call and show you in real time you don’t have to talk I just want to show you to see if you can spot anything wrong here is my discord: d3fault3d
I wouldn’t be much more help beyond this, it’s been years since I used a Windows machine.
One last thing I can think of is to close Visual Studio and open it again to make sure the settings are actually applied to the project.
Otherwise I’m hoping someone with Windows will take a look here.
Ahh damn thanks for trying
Wait, now that you have moved the files, did you reset the environment variable from step 8 in the lazyfoo tutorial?
Try that and restart Visual Studio so it gets detected properly.
Yep I did still not working I am kinda getting frustrated now cause I don’t know what the hell it could be
One last thing I can think of is uninstalling and reinstalling vs
Don’t do that quite yet, but it’s possible that the SDL version that you have is built by the wrong compiler.
Can you check that the version you downloaded is the VC version? (Again, referencing the Lazyfoo tutorial, step 1)
I got it working what did it was uninstalling everything and reinstalling so I reinstalled the release and visual studio I also delete the env variable and added it again and it works