Dot3 returning error on Mac Build

Hello,

I’m currently trying to get a Mac build working for my project. I have a source build of UE4.16 on my Mac that works fine. I’ve transferred my project over from Windows to the Mac and have begun attempting to get it up and running on Mac - but I’m running into an error saying that ‘Dot3’ is an undeclared identifier in one of my classes. The project is being built within xcode from inside my UE4 engine workspace, similar to how I build on Windows in visual studio. I figured Dot3 was built into the engine… How do I fix this, or is this possibly part of a larger conversion issue?

Hi,

I have tested this with the launcher binary build of 4.16 and just added in float test = Dot3(FVector4(), FVector4()) to MyProjectCharacter.cpp generated from the First Person C++ template and it works fine.

You may be missing a header file such as #include "CoreMinimal.h" (or you could include FVector4.h directly). Also sometimes some errors will show up in XCode UI which are not really errors and will not occur when building the engine (via UBT).

If this error is actually when making the Engine and adding the above include directive does not work could you please attach the log output from UBT? And possibly a code snippet of where your error occurs?

Hi, thanks for getting back to me, I really appreciate the help here.

To clarify, the code is identical to my windows build, and the code builds fine via visual studio. Despite this, I did attempt adding CoreMinimal.h and Vector4.h (separately and then both together), and yet the error persisted. The error I believe is when compiling code from the project, though it does try compiling the entire engine.

I’ve attached the output log.

link text

Here is also a snippet of where the compiler finds the issue:

[596/1386] Compile PuzzleButton.cpp
/Users/lucas/Downloads/UnrealEngine-4.16/DistantWorldsCode/Source/DistantWorldsCode/UsableActorActivator.cpp:312:18: error: use of undeclared identifier 'Dot3'
                                                float d = (Dot3(v, line));
                                                           ^
/Users/lucas/Downloads/UnrealEngine-4.16/DistantWorldsCode/Source/DistantWorldsCode/UsableActorActivator.cpp:944:29: warning: declaration shadows a local variable [-Wshadow]
                                        AUsableActorActivator* LocalActivator = Cast<AUsableActorActivator>(ConnectionBeams[i]);
                                                               ^
/Users/lucas/Downloads/UnrealEngine-4.16/DistantWorldsCode/Source/DistantWorldsCode/UsableActorActivator.cpp:941:28: note: previous declaration is here
                                AUsableActorActivator* LocalActivator = Cast<AUsableActorActivator>(ConnectionBeams[i]);

Like I said again, this compiles fine in visual studio for windows, but not xcode.