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

Author Topic: How to port from Mac to Windows  (Read 974 times)

0 Members and 1 Guest are viewing this topic.

jfknyc

  • Newbie
  • *
  • Posts: 5
    • View Profile
How to port from Mac to Windows
« on: June 27, 2020, 07:00:00 pm »
Hello. I've been using my Mac to create an SFML project in XCode, and now my friend — on Windows — wants to take a look at it. I've searched Google and the SFML forums only to find questions asking how to port to Mac, so any advice or help would be very appreciated. Thanks!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: How to port from Mac to Windows
« Reply #1 on: June 27, 2020, 07:53:21 pm »
If you're not using macOS specific APIs and just SFML, then you should be able to create a new project (or use CMake) with all the source files and it should compile out of the box.
One thing to consider is resource path handling, so your application finds the correct location of your textures and sounds.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

jfknyc

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: How to port from Mac to Windows
« Reply #2 on: June 27, 2020, 09:49:40 pm »
By macOS specific APIs, what do you mean? I'm just using the 5 base packages — system, window, audio, graphics, and network. As for resource path handling, is using
resourcePath() + "filename"
sufficient?