Hello!
I added a couple of new classes to a project in the editor using Add Code To Project. After that, Visual Studio gives the errors below.
Even removing the new classes and all my other source code files from the project does not fix it. And the project compiled fine before adding the classes, so the error is not in my code.
And this has happened twice now on different projects.
I’m using UE 4.5.1 and Visual Studio Express 2013 for Windows Desktop.
Thanks for any help!
Visual Studio output:
1>------ Build started: Project: GameProto, Configuration: Development_Editor x64 ------
1> Performing 10 actions (4 in parallel)
1> PCH.GameProto.GameProto.h.cpp
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(10): error C2079: 'FComponentInstanceDataBase' uses undefined class 'DLLIMPORT'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(11): error C2143: syntax error : missing '}' before 'public'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(11): error C2143: syntax error : missing ';' before 'public'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(11): error C2059: syntax error : 'public'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(13): error C2365: 'FComponentInstanceDataBase' : redefinition; previous definition was 'data variable'
1> h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(10) : see declaration of 'FComponentInstanceDataBase'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(14): error C2550: 'FComponentInstanceDataBase' : constructor initializer lists are only allowed on constructor definitions
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(14): warning C4508: 'FComponentInstanceDataBase' : function should return a value; 'void' return type assumed
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(16): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(16): error C2365: 'FComponentInstanceDataBase' : redefinition; previous definition was 'data variable'
1> h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(10) : see declaration of 'FComponentInstanceDataBase'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(18): error C2588: '::~FComponentInstanceDataBase' : illegal global destructor
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(19): error C2575: 'FComponentInstanceDataBase' : only member functions and bases can be virtual
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(19): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(19): error C2365: 'FComponentInstanceDataBase' : redefinition; previous definition was 'data variable'
1> h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(10) : see declaration of 'FComponentInstanceDataBase'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(19): warning C4508: 'FComponentInstanceDataBase' : function should return a value; 'void' return type assumed
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(21): error C2270: 'MatchesComponent' : modifiers not allowed on nonmember functions
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(23): error C2059: syntax error : 'protected'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(25): error C2146: syntax error : missing ';' before identifier 'SourceComponentName'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(25): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(29): error C2146: syntax error : missing ';' before identifier 'SourceComponentTypeSerializedIndex'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(29): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(30): error C2059: syntax error : '}'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(30): error C2143: syntax error : missing ';' before '}'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(37): error C2079: 'FComponentInstanceDataCache' uses undefined class 'DLLIMPORT'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(38): error C2143: syntax error : missing '}' before 'public'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(38): error C2143: syntax error : missing ';' before 'public'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(38): error C2059: syntax error : 'public'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(39): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(39): error C2365: 'FComponentInstanceDataCache' : redefinition; previous definition was 'data variable'
1> h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(37) : see declaration of 'FComponentInstanceDataCache'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(39): warning C4508: 'FComponentInstanceDataCache' : function should return a value; 'void' return type assumed
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(42): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(42): error C2365: 'FComponentInstanceDataCache' : redefinition; previous definition was 'data variable'
1> h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(37) : see declaration of 'FComponentInstanceDataCache'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(45): error C2065: 'TSharedPtr' : undeclared identifier
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(45): error C2065: 'NewData' : undeclared identifier
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(45): error C2182: 'AddInstanceData' : illegal use of type 'void'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(48): error C2270: 'ApplyToActor' : modifiers not allowed on nonmember functions
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(50): error C2270: 'HasInstanceData' : modifiers not allowed on nonmember functions
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(50): error C2065: 'TypeToDataMap' : undeclared identifier
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(50): error C2228: left of '.Num' must have class/struct/union
1> type is 'unknown-type'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(52): error C2059: syntax error : 'private'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(54): error C2143: syntax error : missing ';' before '<'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(54): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(55): error C2059: syntax error : '}'
1>h:\program files\epic games\4.5\engine\source\runtime\engine\public\ComponentInstanceDataCache.h(55): error C2143: syntax error : missing ';' before '}'
1>H:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h(10): fatal error C1189: #error : "STATS must be defined as either zero or one."
1> -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: H:\Unreal Projects\GameProto\Binaries\Win64\UE4Editor-GameProto.pdb
1> Cumulative action seconds (8 processors): 0,00 building projects, 0,10 compiling, 0,00 creating app bundles, 0,00 generating debug info, 0,00 linking, 0,00 other
1> UBT execution time: 4,01 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""H:\Program Files\Epic Games\4.5\Engine\Build\BatchFiles\Build.bat" GameProtoEditor Win64 Development "H:\Unreal Projects\GameProto\GameProto.uproject" -rocket" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========