Let me know in the comments below if you managed to compile, and ask us for help if not. If asking for help create a new topic under #unreal:ask
I actually did not manage to compile, I do not have the executable in the folder that I am saving my code for Visual Studio and I cannot manage where it is saving to.
This is what I am getting:
04/02/2019 03:29 PM .
04/02/2019 03:29 PM …
04/04/2019 01:25 PM globalStorage
04/02/2019 03:34 PM 56 hello.cpp
04/02/2019 03:28 PM 248 settings.json
04/02/2019 01:14 PM snippets
04/02/2019 01:14 PM workspaceStorage
2 File(s) 304 bytes
5 Dir(s) 76,586,577,920 bytes free
‘hello’ is not recognized as an internal or external command,
operable program or batch file.
Yes I did, no problem on windows 10
I managed to compile but got a warning:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include\ostream(708): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
hello.cpp(5): note: see reference to function template instantiation ‘std::basic_ostream<char,std::char_traits> &std::operator <<<std::char_traits>(std::basic_ostream<char,std::char_traits> &,const char *)’ being compiled
I was able to get rid of the warning by typing “_HAS_EXCEPTIONS=0”. That introduces a fun new syntax error, that ultimately looks less serious, so I’ll take what I can get.
Hi I have this issue
c:\Users\User\Documents\VS Code Workspace>cl Hello.cpp Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27025.1 for x86 Copyright (C) Microsoft Corporation. All rights reserved. Hello.cpp C:\Program Files (x86)\Microsoft VisualStudio\2017\Community\VC\Tools\MSVC\14.16.27023\include\xlocale(319): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc Microsoft (R) Incremental Linker Version 14.16.27025.1 Copyright (C) Microsoft Corporation. All rights reserved. /out:Hello.exe Hello.obj
Hello World string doesn’t output. Searching online, it tells me I need to create some bat file or something like that… I’m lost
Compiled fine with VS2017 Pro toolset on a Windows 7 x64 machine. Fresh VSCode install and followed Ben’s exact steps, the only exception being that I had to replace ‘BuildTools’ with ‘Professional’ in the path to VsDevCmd.bat (for obvious reasons).
Hey Justin - I wouldn’t worry about the warning right now. It looks like your program compiled just fine, did you try running the executable itself? I only ask because there was some confusion in the Q&A regarding the difference between compilation and execution.
but isn’t it supposed to output the string after you do the “cl Hello.cpp”
i tot it would run it automatically
The command “cl Hello.cpp” only compiles the code in the source file (technically it performs the linking step too, but Ben will cover that later). In other words, the “cl” command is taking your code and turning it into an executable that you can then run as a standalone program. In fact, “cl” itself is an executable that was also compiled at some point by Microsoft and distributed with the VS development tools. To see the results of your program, you need to run the “hello” executable from the command line. I suggest going back and re-watching the video again and pay particular attention to where Ben talks about compiling and running the program.
I am having the same problem. Did you ever get it fixed and how?
‘c:\Program’ is not recognized as an internal or external command, operable program or batch file
Yup no problems. I’m using Windows 10.
Works perfect on Windows 10. Nice lecture! Like this tutorial very much!
I am getting this error every time I run the command “cl hello.cpp”
hello.cpp C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\include\ostream(708): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc hello.cpp(5): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::operator <<<std::char_traits<char>>(std::basic_ostream<char,std::char_traits<char>> &,const char *)' being compiled Microsoft (R) Incremental Linker Version 14.20.27508.1 Copyright (C) Microsoft Corporation. All rights reserved. /out:hello.exe hello.obj
However, If I run just “hello” and exclude the cl portion I return
c:\Users\rober\OneDrive\Documents\Coding>hello Hello World
Am I missing something or is it actually executing properly?
I was able to compile. However, my graphics card (gtx 550 ti) could not handle the vulkan api used by unreal and it would not start. I put in an rx 570 card and all is now running smoothly.
rx 570 gpu
amd quadrcore cpu
8 gb ram
I can compile the programm and it works just fine, but I get an #include error, which most likely is because I am using VS2017 and VS2019 aswell and i cant find out what my includePath should be.
I´m happy to get the basics of C++ again! Was 3 years ago i played around with C++ and now I might need it for a new job! So this is Gr8!
Got it done! I was a little confused because my computer didn’t seem to want to work when I just typed “hello” into the terminal and it only did anything when I actually included the file extension “.exe” and “.cpp” but that was because I was misunderstanding that if you use the “CL” command it will automatically compile the .cpp under that name and if you don’t it’s trying to run a program that wasn’t there yet. Once I used CL and a .exe program was actually created all went perfectly. Thank you!
Thank you! I tried setting up VS Code to compile C++ about 1,5y ago and couldn’t do it. But with this guide it was so simple! I’m so happy to see it work, compile and run with no problems now.
I’m from the future now apparently and got Visual Studio 2019 Community and just downloaded that with no modifications. Got a error that said “fatal error LNK1104” but that was an easy fix by just downloading the Windows 10 SDK’s with the Visual Studio Installer.
I’m really looking forward to completing this course now. Last time I dropped out when I couldn’t set up VS Code. Idk why, just really wanted the light weight “IDE”.