I have multiple .cpp files and .h files in VS2022, there are no red squiggly things under text (yeah I have no idea what to call them), and the code has forward decl. and no circular includes or anything, this I am certain of.
Yet when I build the project, I get tons of errors like these:
missing type specifier - int assumed. Note: C++ does not support default-int
syntax error: missing ';' before identifier 'Player'
'_POINT': unknown override specifier
missing type specifier - int assumed. Note: C++ does not support default-int
'Object': undeclared identifier
'Object': is not a class or namespace name
'std::vector': 'object' is not a valid template type argument for parameter '_Ty'
'std::vector': too few template arguments
'std::vector': use of class template requires template argument list
'Object': is not a class or namespace name
syntax error: missing ';' before '*'
missing type specifier - int assumed. Note: C++ does not support default-int
unexpected token(s) preceding ';'
'Object': is not a class or namespace name
It appears like the compiler doesn't recognize all of my defined functions, classes enum, etc here.
Yet there is one strange thing, When I chose the option to generate .i files for info, the compilation went smoothly, no errors, as it should have been, yet as soon as it got to the linker phase, the build process stopped with the fatal error LNK1104: Can't open file 'C:\Program.obj'
The .obj files were all generated and in the correct destination, yet the strange thing was all the folders. The path to the debug folder in my project is C:\Users\User\source\repos\Project\Project\x64\Debug
I have tried everything, changing the vcxproj file, changing between C++ versions, visual studio versions, and also creating a fresh project and copy paste all the code,
Nothing
Player. You need to distil it down to a minimal reproducible example that shows the error when compiling a simple single file program. You may also figure it out yourself whilst trying to produce the MRE.