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

Author Topic: Help with running the package  (Read 366 times)

0 Members and 1 Guest are viewing this topic.

julebell27

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Help with running the package
« on: March 26, 2024, 03:31:56 am »
I'm running the code off of my terminal on my new macbook w/m2 chip

#include <SFML/Audio.hpp>
int main() {
    sf::SoundBuffer buffer;
    if (!buffer.loadFromFile("/Users/julebell/Documents/CantinaBand60.wav")){
        return -1;
    }
    return 0;
}

I am running the following commands from the tutorial:

g++ -c main.cpp -I/Users/julebell/Downloads/SFML-2.6.1-macOS-clang-arm64/include

g++ main.o -o sfml-app -L/Users/julebell/Downloads/SFML-2.6.1-macOS-clang-arm64/lib -lsfml-audio -lsfml-window -lsfml-system

export LD_LIBRARY_PATH=/Users/julebell/Downloads/SFML-2.6.1-macOS-clang-arm64/lib && ./sfml-app

But keep getting this error:

dyld[66727]: Symbol not found: __ZN2sf11SoundBuffer12loadFromFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
  Referenced from: <A1CF6C7D-6311-3AB7-BC67-EBB3F2F60BC7> /Users/julebell/24c-128/musical_trees/musical_trees_test/sfml-app
  Expected in:     <no uuid> unknown
zsh: abort      ./sfml-app

julebell27

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Help with running the package
« Reply #1 on: March 26, 2024, 03:37:04 am »
Update: I fixed the library issue but now get this:

dyld[67335]: Library not loaded: @rpath/../Frameworks/vorbisenc.framework/Versions/A/vorbisenc
  Referenced from: <72F2B6C0-2DAE-371C-ADA3-32BBC32ADB2B> /Users/julebell/Downloads/SFML-2.6.1-macOS-clang-arm64/lib/libsfml-audio.2.6.1.dylib
  Reason: tried: '/Library/Frameworks/vorbisenc.framework/Versions/A/vorbisenc' (no such file), '/System/Library/Frameworks/vorbisenc.framework/Versions/A/vorbisenc' (no such file, not in dyld cache)
zsh: abort      ./sfml-app
« Last Edit: March 26, 2024, 03:39:19 am by julebell27 »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: Help with running the package
« Reply #2 on: March 27, 2024, 07:41:26 am »
Make sure you're installing the frameworks that SFML ships with, check the getting started tutorial for macOS.

By the way, g++ on macOS will just point to AppleClang, so you might as well use clang to make it clear what compiler you're using. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

julebell27

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Help with running the package
« Reply #3 on: April 04, 2024, 12:23:13 am »
Thank you! I am now having this issue with NEON
AL lib: (EE) FillCPUCaps: Failed to open /proc/cpuinfo, cannot check for NEON support

I read online this happens when working with a mac, not sure how to fix it.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: Help with running the package
« Reply #4 on: April 06, 2024, 04:51:45 pm »
And what's NEON supposed to be? Never heard of that.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kojack

  • Sr. Member
  • ****
  • Posts: 314
  • C++/C# game dev teacher.
    • View Profile
Re: Help with running the package
« Reply #5 on: April 06, 2024, 06:13:57 pm »
Neon is the ARM CPU equivalent of SSE.
Apparently at least the M1 does support Neon instructions, if they are enabled when building.

I have no idea why in the error listed the /proc/cpuinfo is failing to open though. A permission issue? (I don't do mac development)