My PositionReport.cpp did not generate with a ‘generated.h’ at the top. I tried this twice, and both times it did not work. Here is my CPP file below:
Here is my header file below:
My PositionReport.cpp did not generate with a ‘generated.h’ at the top. I tried this twice, and both times it did not work. Here is my CPP file below:
Here is my header file below:
I see the same errors on my end too, once I installed Unreal with a directory without spaces, so I was able to enable Autocomplete and indexing on Xcode. I tried different things, but so far no good. However building the code from Xcode or compiling from Unreal both work.
I am using XCode 8.2.1 on OSX El Captain.
Unreal Engine 4.17.2
After browing the internet, I found the solution here:
https://answers.unrealengine.com/questions/678667/cannot-initialize-object-parameter-of-type-uactorc.html
I ended up upgrading my OS to OSX High Sierra and XCode 9.2
Now the Autocomplete works and the errors are also gone.
ps: Unreal Engine doesn’t support Xcode 9 yet, so I guess I will have to downgrade to Xcode 8.3 - Doing it now. It should be okay.
Thank you for the response!
So I followed one of the recommendations and just tried to build as is, and it ‘works’.
Even with the same errors showing up in XCode, the code can compile and run in Unreal. I am able to see the log “Chair reporting for duty!”.
I could not follow the suggested solution of changing the C++ Language Dialect in the project settings. I looked for awhile and could not find this setting anywhere. Maybe a different version of XCode?
The next step I will try will be to downgrade my XCode to 8.3, but I am currently having trouble with my Apple Store sign-on, so I will report back when I have done this.
XCode: 9.2
Unreal: 4.18.2
OSX: High Sierra 10.13.2
I successfully downgraded to Xcode 8.3.3. Somehow Xcode 9 has problem with compiling shaders and Unreal loads incredibly slow on my macbook. But Xcode 8.3.3 is good and fast.
For the project settings, you should click on the blue icon “BuldingEscape” on the left side on the navigation. I added a picture. I don’t know if there is a shortcut for it.
I think I solved it!
For future reference, people can get an earlier version of XCode here (https://developer.apple.com/download/more/)
At first I was having trouble seeing the same view as you. Even when replicating everything, I still did not see the C Language Dialect option.
Turns out I was not selecting the correct ‘Target’ in the project settings. The target needs to be the index file. In this case ‘Building_Escape_Index’
Notice my screenshot below:
The Position Report files no longer throw errors!
Thank you for the help. Your screenshot really helped me find the issue.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.