#I need help setting up SFML
78 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
what platform?
Visual Studio
have you downloaded and built sfml yet
Done
you need to add a couple things for it to work
alr
done
wait hol on
include(FetchContent)
FetchContent_Declare(
sfml
GIT_REPOSITORY https://github.com/SFML/SFML
GIT_TAG 2.6.1
)
FetchContent_MakeAvailable(sfml)
add_executable(foo)
target_link_libraries(foo PRIVATE sfml-graphics)
target_sources(foo PRIVATE main.cpp)
dont think hes using cmake
https://github.com/SFML/cmake-sfml-project if you want to use cmake
fork this proj
oh damn
but i guess that would work
I've suggested that twice already... 
alr
where do i put this in
You can open CMake projects directly in VS too, no need to deal with solutions at all.
using cmake is harder tho
cause you have to constantly update cmakelists with new source files
Not really, use GLOB.
wtf is a glob
magic
This isn't the complete script, how far have you gone in the CMake tutorial?
if i say alot would you believe me
Not after that question 

What's the friction, why are you hesitating?
You're gonna have to spend time reading and learning things...
Not just CMake, in general.
i know broðŸ˜
Alr lol, I'll give you some milestones, maybe it will give you some goals to reach.
alr
First: a hello world project using CMake.
Next: a project that uses multiple source files and headers.
Next: project that creates a library and an executable that links to it.
im such a w for this
i can do that
Cool, keep in mind that the C++ itself is not that important here, you're learning how to setup builds and projects properly. So the CMake script, file structure, etc are what matter more.
Yeah
https://cmake.org/cmake/help/latest/guide/tutorial/index.html
You just need step 1 for the milestone you're targeting.
ty bro
im done with step 1
Open the folder in VS and run it
ight
Use Open Folder or Open CMake
nah his typing
it wasnt the right epsilon
oh damn wrong ping
Its not that hard just download sfml package from their website (matches platform and visual studio platform version) extract it, goto Project Properties -> C/C++ -> Additional Include Directories, add the path to extracted sfml's include folder,
Then move to Linker -> Additional library directories and add to it the path of lib folder in extracted sfml, then goto Linker -> Input -> Dependencies put in the names of libraries to link
Like
smfl-graphics.lib sfml-window.lib sfml-system.lib
All while your platform and configuration is set properly.