Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Dot3 returning error on Mac Build


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?

Product Version: UE 4.16
more ▼

asked Jan 04 '18 at 02:52 AM in C++ Programming

avatar image

183 11 12 28

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first


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?

more ▼

answered Jan 08 '18 at 02:39 PM

avatar image

0x414e54 STAFF
66 2 4 5

avatar image Higuy8000 Jan 09 '18 at 02:48 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question