I'm using Visual Studio 2015 community and Unreal Engine 4.12.4. I created some c++ classes, I can open them and I have them attached to the appropriate process. All seems to be fine but I can't compile them - I get a lot of errors (60, sometimes 400+) from the files "my class name".generated.h and "my class name".generated.cpp. I tried this one here, found on another thread here. Those errors are: expected an identifier, #define syntax, sytax error, undeclated identifier, is not a class or namespace name and so on. I would appreciate any advise.
Asked
Active
Viewed 470 times
1
-
have you tried doing the compiling in the unreal editor to see if you get same errors? because it might just be some sort of internal libraries or packages that you don't have in VS15 – Mixone Jun 30 '16 at 08:46
-
I did, it just said "compile failed, try manually", I guess that means in VS – agiro Jun 30 '16 at 08:47
-
upon exiting the reopening the project, it asks if I would like to rebuild it now. If I say yes, it tried but fails and exits. If I say no, it just exits :( – agiro Jun 30 '16 at 08:49
-
i think i found a thread that might help you: https://answers.unrealengine.com/questions/184845/could-not-be-compiled-try-rebuilding-from-source-m.html – Mixone Jun 30 '16 at 08:49
-
i think that is more or less a similar issue – Mixone Jun 30 '16 at 08:50
-
wait wrong link: https://answers.unrealengine.com/questions/230500/basic-c-template-does-not-compile.html – Mixone Jun 30 '16 at 08:50
-
if you check the accepted answer the includes of windows libraries might be the solution you need – Mixone Jun 30 '16 at 08:51
-
Just tried it, creating a new c++ class in UE editor, failed to compile. Then I went to VS where I could open the solution. I went to project>properties>VC++ Directories and at the Include and Library directories I chose "inherit from the...." that was the only option besides "edit" in the dropdown menu. Still no luck :( EDIT: I might add, I did NOT modify anything else there and I had no "instead of" option like in the solution mentioned. – agiro Jun 30 '16 at 09:03
-
As a matter of fact, I made a zip file from the project. It is a small one, intended for practice only. If anyone has the time and patience to check it, it might help more than my description. https://drive.google.com/file/d/0B33RFc9jZBV5OEtrZWd6TlZEUTA/view?usp=sharing – agiro Jun 30 '16 at 09:13
-
did you try purging your intermediate, saved, and binary directories? After that let your modules rebuild. – apollosoftware.org Jul 06 '16 at 15:26
-
no but I found this was due to that I had az UE 4.9 project upgraded to 4.12. The 4.12 worked just fine :D – agiro Jul 07 '16 at 11:26