Did you manage to compile?

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

1 Like

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.

2 Likes

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.

1 Like

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 :open_mouth:

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.

1 Like

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.

1 Like

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>

2 Likes

Yeah, I got this same warning anyway to get rid of it without make it worse?
Using VSC 2019.

2 Likes

Yup no problems. Iā€™m using Windows 10.

Works perfect on Windows 10. Nice lecture! Like this tutorial very much!

1 Like

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?

@ROBERTII Your program is working properly. Refer to this post for more info on the warning.

1 Like

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. :smiley:

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ā€.

1 Like

Privacy & Terms