Closed hammerhai closed 2 years ago
create an empty visual studio solution.
link SFML dependencies
download this repository's files
put them in the solution/projectname folder
add them to the project
compile
resolve any errors
link SFML dependencies
How?
https://www.sfml-dev.org/tutorials/2.5/start-vc.php you can use this guide for a step-by-step setting up sfml with visual studio
you will also need to have glm headers as additional dependancies
I'll try this all and see if it works, I did already follow the SFML Tutorial last night, it just wasn't working by itself, or it's just not working 😂
I have a question, can you maybe send a video that you did to set this up? It's confusing to me in words and no matter what video on YouTube I try, I can't figure this out.
how is the SFML tutorial not working?
Whatever nothing's working.
We can still help you, but we need to know exactly what's going on. When I first tried to set up this project I couldn't do it and gave up as well, I just needed someone to help me out with it.
OK 😞... I followed the tutorial from SFML but, whenever I open a new blank solution in C++ it doesn't seem to show the C++ option from the properties menu. Then I can't do anything. That's why I asked for a video so I could know if I'm doing everything right even after doing everything. Whenever I go to build, I get errors after already adding everything that's needed. I'm too confused.
if you create a blank solution, it won't show c++ options because Visual Studio will not know what language you're using. I know that it says Blank C++ solution, but Visual Studio shows it's options to you based on the language it detects in the project. create a *.cpp file and put a main function in it, and then try opening the settings. it should show you the C++ options now.
OK, do I do a Blank Solution or Blank C++ Solution?
either one will work.
I think blank solution creates only a solution, while blank C++ solution also creates a blank project.
OK, I'm gonna try this and see what happens... Btw, sorry for the late response 😅, learning PHP and doing a Project with it, it's very fun.
P.S @kennyrkun, if that's your dog in your Profile Pic, he/she is very adorable.
I did what you said, this time I got this error:
1>------ Build started: Project: Minecraft, Configuration: Debug Win32 ------ 1>sfml-graphics-s-d.lib(RenderStates.cpp.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86' 1>Done building project "Minecraft.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Now if I change the Machine Type to x64 I get a lot of errors in my code:
However when it's x86, I get:
Im so close, when I change it to release for x86, and it runs, I just get that sfml-window-2.lib, sfml-system-2.lib, and sfml-graphics-2.lib was not found, but I defined then with the -2 in the Linker>Input area. It also then says, reinstalling the program may fix it.
I GOT IT I GOT IT I GOT IT!!!!
I simply followed these last steps and I figured it out, yayy!
Credit to https://stackoverflow.com/questions/29242013/sfml-2-1-and-codeblocks-error-sfml-graphics-2-dll-is-missing-from-your-computer and @kennyrkun and @Hopson97 for helping!
Now I need help with how to do the GLM Headers and how to fix the glad.h errors and stuff.
OK, I have done the GLM Headers correctly, I am now on to the OpenGL part, and it seems to be going well.
So I have everything done right, but now it is still telling me it can not find glad.h when its in the header folder.
I keep getting:
1>------ Build started: Project: MinecraftChallenge, Configuration: Debug Win32 ------ 1>Application.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>Camera.cpp 1>Context.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\context.cpp(3): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>Controller.cpp 1>GLFunctions.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>ItemStack.cpp 1>Main.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>Frustum.cpp 1>Model.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>AABB.cpp 1>Player.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>ChunkRenderer.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>FloraRenderer.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>RenderMaster.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>SFMLRenderer.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\renderer\sfmlrenderer.cpp(3): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>SkyboxRenderer.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>WaterRenderer.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>BasicShader.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>ChunkShader.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>FloraShader.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>Generating Code... 1>Compiling... 1>Shader.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>ShaderLoader.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\shaders\shaderloader.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>SkyboxShader.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>WaterShader.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>PlayingState.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>BasicTexture.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\texture\basictexture.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>CubeTexture.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\texture\cubetexture.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>TextureAtlas.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\texture\basictexture.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>ToggleKey.cpp 1>FPSCounter.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\gl\glfunctions.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>Random.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\util\random.cpp(11): warning C4244: 'argument': conversion from 'time_t' to 'unsigned int', possible loss of data 1>BlockDatabase.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\texture\basictexture.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>ChunkBlock.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\texture\basictexture.h(4): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>Chunk.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>ChunkManager.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>ChunkMesh.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>ChunkMeshBuilder.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\world\chunk\chunkmeshbuilder.h(6): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>ChunkSection.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>PlayerDigEvent.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>StructureBuilder.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>Generating Code... 1>Compiling... 1>TreeGenerator.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>ClassicOverWorldGenerator.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>SuperFlatGenerator.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>World.cpp 1>c:\users\natha\downloads\minecraft-one-week-challenge-master\minecraft-one-week-challenge-master\source\mesh.h(5): fatal error C1083: Cannot open include file: 'glad.h': No such file or directory 1>Generating Code... 1>Done building project "MinecraftChallenge.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Same thing you did for SFML, you need to set the GLAD folder as an additional include directory
I set everything as this: C:\SFML-2.5.1\include;$(SolutionDir)/MinecraftChallenge/glm;$(SolutionDir)/MinecraftChallenge/glad Because I added the glad and include folder into my project, and Im still getting that it cant open glad.h, do I have to do something with linker? I have this for linker: opengl32.lib;glfw3.lib;sfml-system-s-d.lib;sfml-graphics-s-d.lib;sfml-window.libkernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
OK, I set the right variable now I get this: c:\users\natha\source\repos\minecraftchallenge\minecraftchallenge\glad\include\glad\glad.h(38): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
I did something and I got to this: 1>------ Build started: Project: MinecraftChallenge, Configuration: Debug Win32 ------ 1>glad.c 1>c:\users\natha\source\repos\minecraftchallenge\minecraftchallenge\glad\include\glad\glad.h(38): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory 1>Done building project "MinecraftChallenge.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I added the glad.h file to the headers folder.
After I looked in the logs and removed the include to c:\users\natha\source\repos\minecraftchallenge\minecraftchallenge\glad\include\glad\ I got:
Severity Code Description Project File Line Suppression State
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\GL\GLFunctions.h 9
Error C1083 Cannot open include file: 'windows.h': No such file or directory MinecraftChallenge c:\users\natha\source\repos\minecraftchallenge\minecraftchallenge\glad\include\glad\glad.h 38
Error (active) E1696 cannot open source file "glad.h" MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\GL\GLFunctions.h 4
Error (active) E1696 cannot open source file "glad.h" MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Mesh.h 5
Error (active) E1696 cannot open source file "glad.h" MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Mesh.h 6
Error (active) E1696 cannot open source file "glad.h" MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Texture\CubeTexture.h 4
Error (active) E0020 identifier "GLfloat" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Model.h 26
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\GL\GLFunctions.h 8
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Model.h 25
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Model.h 37
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Renderer\RenderInfo.h 6
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Renderer\RenderInfo.h 7
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\BasicShader.h 19
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\BasicShader.h 20
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\FloraShader.h 13
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\Shader.h 18
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\Shader.h 19
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\Shader.h 21
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\Shader.h 22
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\Shader.h 23
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\Shader.h 25
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\Shader.h 29
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\SkyboxShader.h 17
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\SkyboxShader.h 18
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Shaders\WaterShader.h 13
Error (active) E0020 identifier "GLuint" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\Texture\CubeTexture.h 35
Error (active) E0020 identifier "GL_TEXTURE_2D" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\GL\GLFunctions.h 15
Error (active) E0020 identifier "GL_TEXTURE_CUBE_MAP" is undefined MinecraftChallenge C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\Source\GL\GLFunctions.h 16
So I fixed one thing, from this: opengl32.lib;glfw3.lib;sfml-system-s-d.lib;sfml-graphics-s-d.lib; sfml-window.libkernel32.lib; user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) To: opengl32.lib;glfw3.lib;sfml-system-s-d.lib;sfml-graphics-s-d.lib; sfml-window-s-d.lib;kernel32.lib; user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
this is good. unfortunately, I don't remember exactly where I put the GLM folder. I think it was outside the project directory, where the solution file would be stored. that should be that same place you put the SFML folder. I could be wrong though, and it might go in the project directory with the rest of the files in the glm folder, however I'm not sure.
are the missing GLM includes #include "glm.hpp"
or #include <glm.hpp>
?
that should be that same place you put the SFML folder
I linked mine from C:\
Im missing glm.hpp
Edit: I am not missing that, how do I include it as a header?
Another Edit: I've already included it here: C:\SFML-2.5.1\include;C:\Users\natha\source\repos\MinecraftChallenge\MinecraftChallenge\glm;C:\OpenGL\include\GLFW\include;C:\Users\natha\source\repos\MinecraftChallenge\MinecraftChallenge\glad\include;%(AdditionalIncludeDirectories)
I'm just having trouble with glad.h which I have in the includes.
I'm getting this now in Debug:
Severity Code Description Project File Line Suppression State
Error (active) E0059 function call is not allowed in a constant expression MinecraftChallenge C:\Users\natha\Downloads\glad\src\glad.c 48
Error C1083 Cannot open include file: 'glad/glad.h': No such file or directory MinecraftChallenge c:\users\natha\downloads\glad\src\glad.c 25
Error (active) E1696 cannot open source file "winapifamily.h" MinecraftChallenge C:\Users\natha\Downloads\glad\src\glad.c 47
Error (active) E1696 cannot open source file "windows.h" MinecraftChallenge C:\Users\natha\Downloads\glad\src\glad.c 30
Error (active) E1696 cannot open source file "windows.h" MinecraftChallenge C:\Users\natha\source\repos\MinecraftChallenge\MinecraftChallenge\glad\include\glad\glad.h 38
Error (active) E0018 expected a ')' MinecraftChallenge C:\Users\natha\Downloads\glad\src\glad.c 71
Error (active) E0018 expected a ')' MinecraftChallenge C:\Users\natha\Downloads\glad\src\glad.c 136
Error (active) E0028 expression must have a constant value MinecraftChallenge C:\Users\natha\Downloads\glad\src\glad.c 48
Error (active) E0059 function call is not allowed in a constant expression MinecraftChallenge C:\Users\natha\Downloads\glad\src\glad.c 48
Error (active) E0020 identifier "HMODULE" is undefined MinecraftChallenge C:\Users\natha\Downloads\glad\src\glad.c 31
Error (active) E0020 identifier "HMODULE" is undefined MinecraftChallenge C:\Users\natha\Downloads\glad\src\glad.c 71
Error (active) E0020 identifier "HMODULE" is undefined MinecraftChallenge C:\Users\natha\Downloads\glad\src\glad.c 136
In Release, I get over 500 errors.
Ok I'll try and help, but I'll take another route.
Download and install cmake from: https://cmake.org/download/ (Select windows x64 installer)
Make a fresh clone of the repo.
Open file manager and go to the location of the clone.
Click on the bar at the top and copy the path.
Hold the windows key and press 'R'.
Type cmd
and press enter
At this point a black box should appear.
Type cd
and paste the path you just copied and press enter.
Type mkdir build
and press enter.
Type 'cd build' and press enter.
Type cmake-gui ..
and press enter.
A window that looks kinda like this should appear:
Click on configure in the bottom left corner.
Select Vs 2017 from the list and select finish.
Post a screenshot when the text has stopped moving in the small console and paste the console's text.
Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17758. The C compiler identification is MSVC 19.16.27025.1 The CXX compiler identification is MSVC 19.16.27025.1 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Detecting C compile features Detecting C compile features - done Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done CMake Error at cmake_modules/FindSFML.cmake:358 (message): Could NOT find SFML (missing: SFML_GRAPHICS_LIBRARY SFML_NETWORK_LIBRARY SFML_AUDIO_LIBRARY SFML_WINDOW_LIBRARY SFML_SYSTEM_LIBRARY) Call Stack (most recent call first): CMakeLists.txt:22 (find_package)
Configuring incomplete, errors occurred! See also "C:/Users/natha/Downloads/MineCraft-One-Week-Challenge-master/MineCraft-One-Week-Challenge-master/build/CMakeFiles/CMakeOutput.log".
Ok now You need to do this.
Sorry for the late reply 😅
CMake Warning (dev) at CMakeLists.txt:22 (find_package):
Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
CMake variable SFML_ROOT is set to:
C:/Users/natha/Downloads/MineCraft-One-Week-Challenge-master/MineCraft-One-Week-Challenge-master/SFML-2.4.0
For compatibility, CMake is ignoring the variable.
This warning is for project developers. Use -Wno-dev to suppress it.
Found SFML .. in C:/Users/natha/Downloads/MineCraft-One-Week-Challenge-master/MineCraft-One-Week-Challenge-master/SFML-2.4.0/include
Could NOT find GLM (missing: GLM_INCLUDE_DIR)
Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE
Configuring done```
Ok you're almost done.
Click on generate and check if you can open and build the vs project if not:
Im highly confused. Can you take me through all of what I have to do in Visual Studio now?
Ok so open cmake again and click on generate. Then check the build folder in the repo there should be a vs solution file open it and click build.
I got a path of this:
C:\Users\natha\Downloads\MineCraft-One-Week-Challenge-master\MineCraft-One-Week-Challenge-master\build\Debug
and inside are glad.lib
and glad.pdb
Ohhh, ok I see now what I have to do. Gotta add GLM since it didn't work.
Check to make sure you are building everything. Select the all targets on all projects and build.
Do I press Build ALL_BUILD
? Or Build Solution
at the top.
Double click on ALL_BUILD and then press build at the top.
Can someone help me compile on Windows 10 on Visual Studio 2017? Explaining every step as simply as possible.