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

Author Topic: Problem with first launch SFML on XCode  (Read 1514 times)

0 Members and 1 Guest are viewing this topic.

DryFear

  • Newbie
  • *
  • Posts: 3
    • View Profile
Problem with first launch SFML on XCode
« on: August 17, 2024, 08:29:20 pm »
Hello,
I have error "'SFML/Graphics.hpp' file not found"
But xcode adjust me autofill with header files (attached pic.). XCode knows what's inside the library, but still show me an error.
« Last Edit: August 17, 2024, 08:32:15 pm by DryFear »

DryFear

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Problem with first launch SFML on XCode
« Reply #1 on: August 17, 2024, 08:49:00 pm »
I switched "embed" option in frameworks and libraries to "do not embed" and error is gone. Now i have success build but there is another issue in command line (pic.).
Please help me fix it, i so tired by trying make it works.

DryFear

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Problem with first launch SFML on XCode
« Reply #2 on: August 18, 2024, 12:31:43 am »
Sorry for poor info about problem, i am newbee in c++ and xcode (i am student), therefore i just don't know what to describe.  my problem is similar to the one described in this post https://en.sfml-dev.org/forums/index.php?topic=29322.msg180847#msg180847

But I installed all the libraries as written in the tutorial. (I did steps from here https://www.sfml-dev.org/tutorials/2.6/start-osx.php and, when it didn't work, from here https://en.sfml-dev.org/forums/index.php?topic=28823.0)
I may not have understood what is meant by "Install". I simply copied the content from "Frameworks" to "/Library/Frameworks" (its 6 .framework dirs), and also copied all the content from "extlibs" to "/Library/Frameworks" too.

I have mac m1, and downloaded clang 2.6.1 arm64 version of SFML
« Last Edit: August 18, 2024, 12:33:49 am by DryFear »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10991
    • View Profile
    • development blog
    • Email
Re: Problem with first launch SFML on XCode
« Reply #3 on: August 20, 2024, 11:07:47 pm »
As I don't use macOS, I unfortunately can't provide a lot of assistance with XCode.

In general, make sure the framework exist at the path where the compiler/linker is looking for them.

What we recommend is to use the SFML CMake Template, as it will build SFML for you and ensure that it's correctly linked to your project.
CMake will allow you to use any other IDE on macOS if you want or you can generate XCode project files.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/