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
c:\Users\admin\AppData\Roaming\Code\User>hello
ā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.
Hi Pyro,
but isnāt it supposed to output the string after you do the ācl Hello.cppā
i tot it would run it automatically
Hey Justin,
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
c:\users\Antonio>
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.
linuxmint 19
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ā.