BLAM-Lab-Projects / experiment-code

Note: As of June 2017, AW is no longer supporting this version of the code. Recommended switching over to the SDL2 repository.
0 stars 0 forks source link

Build not running #8

Closed adrianhaith closed 8 years ago

adrianhaith commented 8 years ago

Hi, I tried checking this out to make a few changes, but couldn't get the code to run (even after fixing a compile error that I have fixed, committed and pushed).

The error I get is: "The program can't start because SDL.dll is missing from your computer. Try reinstalling the program to fix this problem" image

The file is definitely there in a folder that appears to be linked to. Any ideas how this can be fixed?

awong26 commented 8 years ago

All .DLL files need to be copied into the "Debug" folder. I put a copy of them all into the "setup" folder, just copy all of them from there and paste them.

We haven't figured out how to get around this error yet... it's crazy because it can find all the libraries during compile and linking.

aforren1 commented 8 years ago

We could also have a "post-build event" (see https://msdn.microsoft.com/en-us/library/h7dhf0ty.aspx), and automatically copy the dlls into the proper folder using the command line (using copy or robocopy?)

awong26 commented 8 years ago

I saw other people say that it is also possible to set the paths to the dlls in the environment variables. I tried it, though, and it didn't work.

I'm not sure if a post-build event to do a copy is a good idea because then we'd be copying these files over every time we re-compile and run.

aforren1 commented 8 years ago

I think the issue with the environment variables is it makes the project a little less portable, though it would be nice to only have a single dll copy for each machine...

It's possible to do conditional statements in cmd (i.e if), so it's possible to check the existence of a file beforehand.

aforren1 commented 8 years ago

@awong26 in case you didn't find it already, you could just add

Debug/
!Debug/*.dll

I think?

awong26 commented 8 years ago

Nope, I tried that syntax, and also just

Debug/!*.dll

Neither of them seem to add the Debug folder, unless I did something wrong?

aforren1 commented 8 years ago

Got it, it's

Debug/*
!Debug/*.dll
awong26 commented 8 years ago

Debug folder with DLLs uploaded, which should solve the original issue whenever anyone pulls a new copy of the project.