GenericGraph icon indicating copy to clipboard operation
GenericGraph copied to clipboard

Linker error trying to modify editor module

Open cristiangj opened this issue 3 years ago • 3 comments

Severity Code Description Project File Line Suppression State Error LNK2005 IMPLEMENT_MODULE_GenericGraphEditor already defined in EdGraph_GenericGraph.cpp.obj

This is because you have the IMPLEMENT_MODULE macro on GenericGraphEditor.h causing a double definition when is imported on the .cpp file. Moving the macro to the end of the .cpp file will resolve this issue.

PD: Also you forgot to add ";" at the end of the macro

cristiangj avatar Jul 20 '21 11:07 cristiangj

+1, this looks like a Unity compilation issue. Once a file is edited and knocked out of the Unity build, it will generate this error.

EmilianC avatar Nov 24 '22 22:11 EmilianC

I'm going to submit a pull request to fix this issue, I've also just experienced this. Might as well fix it while I'm here.

ABTWG22 avatar Jul 12 '23 12:07 ABTWG22

Here is the fix #31

ABTWG22 avatar Jul 12 '23 12:07 ABTWG22