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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - PWGuy

Pages: [1]
1
General / Re: Can't compile "SFML Works" example project on m1 Mac
« on: February 04, 2021, 04:05:48 am »
Your issue probably boils down to:

I installed SFML successfully using home-brew

Homebrew most certainly hasn't gotten a arm64 version available for SFML, so you end up installed a x86_64 version, which then, as the linker tells you, is incompatible with your arm64 build.
If you want to build your application natively for arm64, you have no other choice than to build SFML and its dependencies (freetype, vorbis, flac, ogg, etc) for arm64 as well.
Alternatively you could maybe still get a x86_64 compiler and compile as before, but maybe that's not exactly what you want.

I'd be interested in hearing your experience with the M1 and SFML.

Thanks for the quick response - it's definitely more clear to me now!

However, I am unlikely to build SFML and its dependencies for arm64.  I have (non Insiders) VSCode working fine with x86_64 SFML installed - I will just keeping using it until we have a more "official" SFML build for arm64.

I'm really surprised it hasn't been done yet in the community, to be honest..

I have an M1 Mini and it is amazing - Rosetta 2 is real and translates extremely well!  I am very happy with it!  Further, as I said above, VSCode w/ SFML x86_64 installed works just fine, albeit a little memory intensive due to Rosetta 2, and a bit slower than x86, but all good!  It will be nice once SFML is provided via arm64 because VS Code Insiders (made for arm64) requires less memory and is extremely responsive!

2
General / Can't compile "SFML Works" example project on m1 Mac
« on: February 03, 2021, 04:22:32 am »
I have a new M1 Mac (macOS Big Sur 11.2) and downloaded Visual Studio Code Insiders.  I installed SFML successfully using home-brew and have the "boiler plate" folder in place.  (Followed instructions in this video which worked great on my previous Intel Mac:

).

When I open the "boiler plate" folder, it loads the sample project.  When I try to build it, I get error below.

Is SFML not yet compatible w/ Apple Silicon?


Build & Run: Debug (target: sfml-vscode-boilerplate)

⇛  Linking: bin/Debug/sfml-vscode-boilerplate
ld: warning: ld: warning: ignoring file /usr/local/lib/libsfml-window.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64ld: warning: ignoring file /usr/local/lib/libsfml-network.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /usr/local/lib/libsfml-graphics.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

ignoring file /usr/local/lib/libsfml-audio.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /usr/local/lib/libsfml-system.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
  "sf::CircleShape::CircleShape(float, unsigned long)", referenced from:
      _main in Main.cpp.o
  "sf::RenderStates::Default", referenced from:
      _main in Main.cpp.o
  "sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)", referenced from:
      _main in Main.cpp.o
  "sf::RenderTarget::clear(sf::Color const&)", referenced from:
      _main in Main.cpp.o
  "sf::RenderWindow::RenderWindow()", referenced from:
      _main in Main.cpp.o
  "sf::RenderWindow::~RenderWindow()", referenced from:
      _main in Main.cpp.o
  "sf::Color::White", referenced from:
      _main in Main.cpp.o
  "sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)", referenced from:
      _main in Main.cpp.o
  "sf::Shape::setTexture(sf::Texture const*, bool)", referenced from:
      _main in Main.cpp.o
  "sf::Shape::setFillColor(sf::Color const&)", referenced from:
      _main in Main.cpp.o
  "sf::Shape::~Shape()", referenced from:
      sf::CircleShape::~CircleShape() in Main.cpp.o
  "sf::String::String(char const*, std::__1::locale const&)", referenced from:
      _main in Main.cpp.o
  "sf::Window::close()", referenced from:
      _main in Main.cpp.o
  "sf::Window::create(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)", referenced from:
      _main in Main.cpp.o
  "sf::Window::display()", referenced from:
      _main in Main.cpp.o
  "sf::Window::pollEvent(sf::Event&)", referenced from:
      _main in Main.cpp.o
  "sf::Texture::loadFromFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sf::Rect<int> const&)", referenced from:
      _main in Main.cpp.o
  "sf::Texture::Texture()", referenced from:
      _main in Main.cpp.o
  "sf::Texture::~Texture()", referenced from:
      _main in Main.cpp.o
  "sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)", referenced from:
      _main in Main.cpp.o
  "sf::RenderWindow::getSize() const", referenced from:
      _main in Main.cpp.o
  "sf::Window::getSystemHandle() const", referenced from:
      _main in Main.cpp.o
  "sf::Window::isOpen() const", referenced from:
      _main in Main.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [bin/Debug/sfml-vscode-boilerplate] Error 1
make: *** [all] Error 2

✘  Failed!
   Review the compile errors above.


The terminal process "/bin/zsh '-c', 'bash ./build.sh buildrun Debug vscode'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.



I have confirmed that the Insiders version of Visual Studio Code for Mac (arm64) is compatible with Apple Silicon Macs.  Further, I THOUGHT I read somewhere (can't find source, sorry) that the C/C++ extension for Visual Studio Code wasn't yet Apple Silicon compatible but I'm not 100% sure now.

What else can I provide to help me figure this out?

Help!

3
Feature requests / Re: macOS Metal support?
« on: December 27, 2020, 04:33:13 pm »
I think at this point the limiting factor isn't our willingness to support any alternative graphics API but just finding people who are experienced enough and have the time to do the work. Considering Apple already made it clear they are moving away from OpenGL in the long term, I don't think anybody is going to push back on a Metal implementation if a pull request is submitted.

This draft pull request I submitted over a year ago suggests a direction the library can take to start moving in this direction.

Sounds great - thanks!

4
Feature requests / macOS Metal support?
« on: December 25, 2020, 12:17:19 am »
Just curious if there is a plan to implement Metal support, meaning transitioning away from openGL on macOS ?

I just got an M1 Mac mini and so I figured the arm CPU architecture isn’t going to be the limiting factor over time but openGL is not being updated by Apple any longer, so not sure if there’s a plan to transition away?

5
I have been working on a NES Zelda 1 re-make for awhile now (lots of breaks since we had another child!).  And this is probably perfect for me!  Not sure when I’ll get to the point of using it since I focused on intro / player name entry first but I’ll try to implement in my proof of concept soon!

Pages: [1]