-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mac OS X support #6
Comments
following today's video you should be able to create a an xcode solution. you will need to get premake5 binaries from github and the launch |
You'd also have to add some macOS-specific macros and configuration stuff to |
you should also be adding macros like HZ_PLATFORM_MACOS |
also, __declspec(dllexport) and __declspec(dllimport) seem to be Windows-exclusive. I've been looking for an alternative way of exporting and importing symbols on Mac but can't seem to find anything. Is this supposed to work without defining anything? |
Mac and Linux, don't use these directives for creating and using shared objects. You can specify them but they will be ignored. Unlike on Windows, you don't need to "export" or "import" symbols. |
no the std like alternative is #define HAZEL_API __attribute__((visibility("default"))) |
Ok, so I managed to build and run the Sandbox project, however when I click
on Xcode's play button with that project selected, it says "Build
Succeeded" and nothing happens. Shouldn't a terminal window open?
…On Sun, 18 Nov 2018, 21:51 S-Marais ***@***.*** wrote:
no the std like alternative is
#define HAZEL_API __attribute__((visibility("default")))
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/Aek9Bsk1n8oI5K1QUQyro9R-ggMRDCWRks5uwchkgaJpZM4Yn84k>
.
|
No it would be using the built in terminal in Xcode. Just change the setting to launch new terminal on application run in Xcode. |
Iccatala, sorry, can you explain me how did you managed to build this project on xCode, I tried but I can’t do it ahah |
You have to create a new filter for "system:macosx" using the same
configurations as for the Windows one, replacing every "windows" word for
"mac", so the code you compile is different for each platform. In Core.h,
remove the #error macro (there is no need for __declspec(dllexport) in
xcode, since every class and function will be accesible throughout the
whole solution by default). Then download and install premake for mac and
run it with the parameter xcode4. Let me know if there are any errors
remaining, it's possible I've forgotten something.
Also, I'll try to build it for cmake so it can be edited from VSCode, which
I think is far superior to XCode
El lun., 26 nov. 2018 a las 10:16, Gabriele Invernizzi (<
notifications@github.com>) escribió:
… Iccatala, sorry, can you explain me how did you managed to build this
project on xCode, I tried but I can’t do it ahah
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/Aek9BnURXB1pD3oUfdoDT85Kf3w9gZUOks5uy7FRgaJpZM4Yn84k>
.
|
Thank you very much, I'll try
|
I tried but it doesn't work, perhaps is my fault but can you help me with this? I think I did some (if not a lot) mistakes, can you help me?
|
On PR #27 we have a working build on Linux, which should contain similar changes to those needed for Mac OS X support. You could maybe try those changes (maybe changing all the |
@GabrieleInvernizzi How about you Use clion (an ide that uses cmake) instead of premake and xcode .. spglog and glfw already use cmake and writing cmake files for glad and imgui wont be hard. I just like that clion is cross platfrom and i can work from my macbook or windows pc. https://www.jetbrains.com/clion/ |
@not-a-vegetable you can generate cmake files with premake. If you want to use clion you can do that here's the link to the extension |
@thatweirdcoder I also enjoy CLion for the same reason. However for those who prefer Xcode, it also supports CMake, so there's no reason you have to switch to a new IDE to use it. |
Unfortunately, it doesn't work with premake5, and the creator isn't updating the project. Issue from 2015. It seems like there are no cmake action extensions. Even the one listed in the premake docs is dead Premake modules. |
If anyone is interested, I'm doing this series on macOS using VS Code with CMake instead of premake. I'm currently up to episode 16. Works fine with Xcode if you want to use that. |
I assume you are talking about a youtube series. You should probably not promote in Hazel issues. This would be more appropriate for the "game engine series" section in discord. But regardless, you do not have a link on your github project to the series. |
Hi,
configuration to it. I then also added this to the GLFW configuration:
My version of the engine does not require any of the DLL_EXPORT/IMPORT stuff in it. But these settings will build GLFW properly for MacOS. Some of the macros are ones which I changed for my engine but I think you get the gist. I am currently using these configurations in aa VS2019 solution (not surprising as Windows already built fine) and with Make on MacOS. I have not tried this with Xcode. |
Furthermore, the
This code is required in a Mac window to ensure that the core profile and GL version 410 is being used. |
how about just creating a different repo for macOS and linking it in this one? |
How can I use the code in Xcode on Mac? If there is a way of course
The text was updated successfully, but these errors were encountered: