Comments (13)
To get this to build (in Visual Studio) and run I did the following:
- Make sure you have the "Desktop development with C++" workload installed for Visual Studio (in the "Visual Studio Installer")
- Download / Extract latest SDL2-devel (SDL2-devel-2.24.0-VC.zip) - from https://github.com/libsdl-org/SDL/releases
- Open Zelda3 SLN in Visual Studio
- Go to "Project Properties" (right click "zelda3" in Solution Explorer and select "Properties")
- In Configuration Properties > C / C++ > General: Updated Additional Include Directories path to point to the extracted SDL files "include" directory
- In Configuration Properties > Linker > Input: Change Additional Dependencies path to point to:
lib\x64\SDL2.lib
andlib\x64\SDL2main.lib
- Build solution
- Copy
lib\x64\SDL2.dll
to output directory (x64\Release
orx64\Debug
) - Run Zelda3.exe
- Rejoice!
Screenshots:
from zelda3.
@ReticentRobot the SLN file I referenced is for the Zelda3 project (I updated my post).
A better option might be to use kageurufu's fork of this project. He fixed all the SDL dependencies to use Nuget. Using his branch might be a better option since it doesn't require any setup of SDL and it "just works" (he has an open PR which will hopefully get merged into this repo).
git clone https://github.com/kageurufu/zelda3
cd zelda3
git checkout sdl_from_nuget
Then extract/compile rom stuff in the tables directory.
Open in VS, build, and run .exe
from zelda3.
I downloaded SDL2-devel-2.24.0-VC.zip from that project, but I seem to be missing some files in the zip? Like I don't see a .sln file in it at all:
EDIT: Oh wait, I missed your edit on step 3 :) Thank you!!
from zelda3.
Have the same issue, but i also have added the sdl include folder.
from zelda3.
Have the same issue, but i also have added the sdl include folder.
The linker also has a dependency of D:\Lib\SDL2-2.0.20\lib\x64\SDL2main.lib and D:\Lib\SDL2-2.0.20\lib\x64\SDL2.lib. After fixing those paths and running again VS, I face this:
from zelda3.
That didn't fix the issue, as compiling for x86 makes the application to run. There's something wrong with x64 :/
Edit: Linking the DLL instead worked for me.
from zelda3.
Got the same error, x86, x64, debug, release build. Nothing seems to work
Severity Code Description Project File Line Suppression State
Error C1083 Cannot open include file: 'SDL.h': No such file or directory zelda3 C:\Users\davis\source\repos\zelda3\main.cpp 8
EDIT: I fixed by checking the properties of the project, it has the SDL library on D: directory lol so i placed my files there :v and it worked!
from zelda3.
Which version of SDL should I install? I used SDL by Sam Lantinga 1.2.15.16 and I'm not longer getting the Can't find SDL.h error, but now I'm getting 16 new errors in the vein of 'device': undeclared identifier all in the file spc_player.cpp
from zelda3.
Perfect! Thank you so much, that way went way smoother. Success!!
from zelda3.
I tried doing this and am getting below errors:
Severity Code Description Project File Line Suppression State
Error NuGet Package restore failed for project zelda3: Unable to find version '2.0.5' of package 'sdl2'.
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages: Package 'sdl2.2.0.5' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages'.
. Please see Error List window for detailed warnings and errors.
Severity Code Description Project File Line Suppression State
Error NuGet Package restore failed for project zelda3: Unable to find version '2.0.5' of package 'sdl2.redist'.
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages: Package 'sdl2.redist.2.0.5' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages'.
. Please see Error List window for detailed warnings and errors.
Severity Code Description Project File Line Suppression State
Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets. zelda3 C:\Users\rdmci\Desktop\zelda3\zelda3\zelda3.vcxproj 249
from zelda3.
@rdmcintee Looks like you need to manually restore NuGet packages for the project (see the error in the last paragraph). https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore#restore-packages-manually-using-visual-studio
from zelda3.
@ReticentRobot the SLN file I referenced is for the Zelda3 project (I updated my post).
A better option might be to use kageurufu's fork of this project. He fixed all the SDL dependencies to use Nuget. Using his branch might be a better option since it doesn't require any setup of SDL and it "just works" (he has an open PR which will hopefully get merged into this repo).
git clone https://github.com/kageurufu/zelda3
cd zelda3
git checkout sdl_from_nuget
Then extract/compile rom stuff in the tables directory.
Open in VS, build, and run .exe
This worked much better for me. No SDL setup is needed. Visual Studio does everything for you when you build the project/solution. Thanks!
from zelda3.
NuGet is used now.
from zelda3.
Related Issues (20)
- Dark Palace Missing Sound Effect HOT 3
- Ram mismatch when pressing y (using book) during desert prayer cutscene
- Ram mismatch when throwing bombs off death mountain bridge
- Overworld map is dimmed when accessed from forest area
- Ram mismatch when dying/continuing indoors with zelda follower
- Agahnim barrier fails to spawn with widescreen enabled
- tables/text_compression.py - line 472 has a syntax error HOT 1
- failed to build with SDL2 2.26.5 on macOS 13.3.1 HOT 4
- other/msu/encode_opus.py error
- Fails to build on Raspbian GNU/Linux 10 (buster) HOT 2
- Ram mismatch when pressing select while in inventory menu HOT 1
- Compile errors on macOS 13.4 HOT 2
- Feature Request: The ability to bindkeys for "Reset" and "Exit"
- Set level of sword that can break pots
- Fat Fairy does not appear early. HOT 14
- Switch Port Building HOT 1
- My feature requests HOT 1
- MSU sound crackling/popping at the very begninning after save slot is created
- build errors on macOS Ventura (13.5.1) HOT 6
- Compile error: too many arguments to function 'VWF_RenderSingle' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zelda3.