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

Author Topic: I cant build SFML in visual studio code 2019  (Read 1631 times)

0 Members and 1 Guest are viewing this topic.

xamza1608

  • Newbie
  • *
  • Posts: 2
    • View Profile
I cant build SFML in visual studio code 2019
« on: April 24, 2020, 10:23:06 am »
Hello I am trying to install SFML.
when i am trying build it i get this error.


The package name passed to find_package_handle_standard_args (VORBIS)
does not match the name of the calling package (Vorbis).  This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.


Does anyone have an idea. I used one hour and more to solve this but got no where
I am using visual studio code 2019 and building it using cmake.


Cmakelists.txt looks like this:

cmake_minimum_required(VERSION 3.17.1)

project(ssp)


add_subdirectory(libs/SFML)


include_directories(include
                    libs/SFML/include
)

add_executable(main src/main.cpp)


target_link_libraries(main sfml-graphics sfml-system)


*/ 


My cmake builded project can only compile when I press shift f5. Maybe it is a mistake with cmake?  All the tutorials use visual studio and not visual studio code. Maybe that's a problem?

gamecoder.nz

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: I cant build SFML in visual studio code 2019
« Reply #1 on: April 24, 2020, 10:36:13 am »
Why are you trying to build it?  Why use visual studio code?  Why not Visual Studio?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10817
    • View Profile
    • development blog
    • Email
Re: I cant build SFML in visual studio code 2019
« Reply #2 on: April 24, 2020, 10:53:44 am »
Download the latest changes on master, that error should be fixed there.

Why are you trying to build it?  Why use visual studio code?  Why not Visual Studio?
Just questioning all actions isn't really helpful. ;)
Don't think you really need an answer to why building SFML is a good idea...
And people are free to use whatever tooling they want, but it's true that some tools can be a bit more hands-on.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

xamza1608

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: I cant build SFML in visual studio code 2019
« Reply #3 on: April 24, 2020, 11:28:38 am »
Download the latest changes on master, that error should be fixed there.

Why are you trying to build it?  Why use visual studio code?  Why not Visual Studio?
Just questioning all actions isn't really helpful. ;)
Don't think you really need an answer to why building SFML is a good idea...
And people are free to use whatever tooling they want, but it's true that some tools can be a bit more hands-on.

I have pressed git tag and then git checkout 2.5.1 but it did not work.


I have used many hours on trying to fix this. Should I start from scratch and use visual studio instead?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10817
    • View Profile
    • development blog
    • Email
Re: I cant build SFML in visual studio code 2019
« Reply #4 on: April 24, 2020, 01:10:26 pm »
Well if you check out a tag, you're not getting the latest version from master. ;)
Just switch to the master branch and it should start working (you may potentially have to clear the CMake cache).
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/