Build UE4 Failed from Source on Mac OS X
I am using the Engine source from branch 4.10. I have successfully run via Terminal:
I am now on the section where I need to build Unreal Engine 4 from source using Xcode. I am on a Mac Mini running OS X El Capitan 10.11.4 with Xcode version 7.3. I am getting the following error during build:
What can I do to fix this? Is this related to not having libjpeg-dev installed on the Mac or is it related to clang or something else entirely? Please provide step-by-step guidance if you know of a solution.
Alright, the issue has to do with how Clang in Xcode 7.3 has newly defined rules that jpgd.cpp does not obey. The quick fix was to edit the jpgd.cpp file as posted here. I am unaware of what repercussions this may have on projects, but so far nothing has gone wrong on my side. I am now able to build the engine properly using Xcode 7.3 with the Build for Running option under Product.
It produces a proper UE4Editor.app file which I can run in standalone.
Basically, inside the source folder for the engine at Engine/Source/ThirdParty/libJPG/jpgd.cpp, change line 569 to the following (notice the change in bracket usage):
A possible alternative solution if you have access to the Apple Developer paid programme, then you can download an older version of Xcode that has an older version of Clang as posted here, if you feel unsafe modifying the jpgd.cpp file.
Follow this question
Once you sign in you will be able to subscribe for any updates here