Expected ';'at end of declaration - ConstructorHelpers.h

Hello,

I’ve been programming in UE4.6.1, and when building in XCode 6.3.1, I keep encountering the following error:

ExternalBuildToolExecution VirtualLabEditor\ -\ Mac
    cd /Users/Shared/UnrealEngine/4.6
    export ACTION=
    /Users/Shared/UnrealEngine/4.6/Engine/Build/BatchFiles/Mac/RocketBuild.sh VirtualLabEditor macosx DebugGame /Users/iWilko/Documents/Unreal\ Projects/VirtualLab/VirtualLab.uproject

Setting up Mono
Building VirtualLabEditor...
Compiling with Mac SDK 10.10
Parsing headers for VirtualLabEditor
FMallocCrash overhead is 3780608 bytes
Reflection code generated for VirtualLabEditor
Performing 13 actions (4 in parallel)
[1/13] Compile VirtualLab.h
In file included from /Users/iWilko/Documents/Unreal Projects/VirtualLab/Intermediate/Build/Mac/VirtualLabEditor/DebugGame/VirtualLab/VirtualLab.h:4:
In file included from /Users/iWilko/Documents/Unreal Projects/VirtualLab/Source/VirtualLab/Public/VirtualLab.h:6:
In file included from Runtime/Engine/Public/EngineMinimal.h:10:
In file included from Runtime/CoreUObject/Public/CoreUObject.h:32:
Runtime/CoreUObject/Public/UObject/ConstructorHelpers.h:31:15: error: expected ';' at end of declaration
                T* ObjectPtr u = LoadObject<T>(NULL, *PathName);
                            ^
                            ;
1 error generated.

Even if I remove all my .cpp and .h files from the project temporarily, I get the same, which suggests that it’s not reaching my code to build. I have not to my knowledge touched any files except those created in the project itself. Please let me know if more information is required.

Thanks for help in advance!

Hello, Wilkolicious

This error may occur in case your compiler’s C++ standard setup is outdated.
Please make sure that it is set to C++11.

Hope this helped!

Cheers!

I am having the same problem. How did you solved it?

I changed the following and it still gives me the same error:

  • C++ Language Dialect - C++11
  • C++ Standard Library - libc++ (LLVM C++ standard library with c++11 support)

I am on XCode 6.4. OSX 10.10.

Near the top left portion of Xcode, the build scheme had changed itself to the non-unreal engine option:


I had to choose the scheme with the unreal logo as its icon (in my case, ‘VirtualLabEditor - Mac’ ), for it to rid itself of the error.

Hi Anshul,
I’ve posted the solution that worked for me as an answer to the original post. Hopefully that solves your problem.