Common but confusing compile errors

unresolved external symbol

Typically caused by missing dependency in build.cs

Inconsistent DLL linkage

Probably incorrect YOURMODULE_API macro in header file class declaration. Remove or replace with the macro for your module.

generated.h already exists

Error C1189 :#error: “NiagaraDataSet.generated.h already included, missing ‘#pragma once’ in NiagaraDataSet.h”

Typically caused by a bad include, such as

#include "../../../../path/to/unreal/something/other.h"

Duplicate function declaration

This can sometimes be caused by using BlueprintNativeEvent and not following the correct naming scheme:

void MyFunction();
void AMyActor::MyFunction() {

In the above case, the function should be called MyFunction_Implementation which will solve the problem.

member of dll interface class may not be declared with dll interface

This occurs if you have an incorrect MODULENAME_API macro used on one of the functions declarations of a class in your header file. The error message usually contains the name of the function using the wrong macro, and the file where it occurs. Remove the macro or replace it with the correct one for your module.