Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: struggling to setup sfml  (Read 1280 times)

0 Members and 1 Guest are viewing this topic.

blodrav3n

  • Newbie
  • *
  • Posts: 3
    • View Profile
struggling to setup sfml
« on: September 08, 2023, 01:34:42 pm »
I am having difficulties to setup the SFML version compiled for Visual C++ 15 (2017)-64bit.
I installed sfml, saved it in a c:\ folder with no spaces.
I created an environment variable and called
SFML_DIR with value C:\something\SFML-2.5.1, then i added %SFML_DIR%\bin to the path variable.
I tried running a project in visual studio 2022 and it appeared:
Severity Code Description Project File Line Suppression State.
Error (active) E1696 cannot open source file "SFML/Graphics.hpp" .
then I tried watching another youtube video and changed the project properties and found problems with the linker.
Linker Tools Error LNK2001

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: struggling to setup sfml
« Reply #1 on: September 08, 2023, 02:02:29 pm »
Did you follow the official tutorial on how to setup Visual Studio?

https://www.sfml-dev.org/tutorials/2.6/start-vc.php
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

blodrav3n

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: struggling to setup sfml
« Reply #2 on: September 09, 2023, 12:18:38 pm »
before no, now I tried to follow all the instructions in the tutorial you linked but still I can't, it gives me linking problems. the tutorial shows lib files that are not present in the SFML version compiled for Visual C++ 15 (2017)-64bit such as opengl32.lib.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: struggling to setup sfml
« Reply #3 on: September 09, 2023, 12:36:33 pm »
It is presumed that you have OpenGL installed on your device to be able to use OpenGL sections of SFML.

They will likely be installed in somewhere like C:\Windows\System32.

If not, you'll need to install OpenGL drivers for your graphics card.
https://www.khronos.org/opengl/wiki/Getting_Started#Downloading_OpenGL
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

blodrav3n

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: struggling to setup sfml
« Reply #4 on: September 11, 2023, 04:06:10 pm »
I discovered that I have WinMM.Lib and OpenGL32.Lib and Gdi32.Lib on my computer.
I tried to enter them into the input section of the linker without success. ( I entered:
sfml-window-s.lib
sfml-system-s.lib
openGL32.Lib
freetype.lib
sfml-window-s-d.lib
sfml-system-s-d.lib
WinMM.Lib
sfml-graphics-s.lib
sfml-graphics-s-d.lib
Gdi32.Lib).
Should I create OpenGL Context and load all the necessary functions to use OpenGL?(I installed the recent driver for my graphic card).

 

anything