Can't compile first C++ code
I was following this video tutorial (Vid here)
and at the part I've linked to when I was attempting to compile my first C++ class I got an error. It said I needed to recompile my project to see my script in the contents folder. I reopened the project and nothing appeared. Also Visual Studio didn't open. The .h and .cpp files appeared in the source folder but that was it. At the time I had Visual Studio Community 2017 installed. After some searching I found I needed to modify my installation and add the modules for C++ for Game Developing and some others to get this working. So I modified these things but it fixed nothing. (Actually this step fixed an issue that stopped my project from starting altogether after I did the first C++ class attempt). I uninstalled VS2017 and installed an old VS2015 but this didn't fix anything. I feel like there's a simple fix to this problem.
Sorry I don't have the specific error messages yet. I'll be able to send them when I get home in a few hours.
asked Jan 17 '18 at 10:40 AM in C++ Programming
Jack W Lewis
Sorry for not responding in an age. But I got it working. I used this vid to remove all VS stuff from my machine an reinstalled VS with the needed expansions for C++ game coding and stuff. Unreal gives me an error when I create c++ files and attempt to open VS straight away. But when I build them in VS separately and open them from Unreal it all works as expected!
answered Feb 02 '18 at 06:40 PM
Jack W Lewis
Turn off editor, since hot reload tend to be buggy try to make it work in normal way first without hot reload, open VS project file in your project directory it is sln file. Now considering you have "Changes to generated code are not allowed - conflicts written to" try rebuild, if that does not work delete "Intermediate" in your project folder. This should cause UHT to regenerate the code.
In VS2017 (which should work with UE4) installation check if you got VC++ toolchain and C++ core features, veryfy if you got cl.exe in location it points to.
Follow this question
Once you sign in you will be able to subscribe for any updates here