Hello World - Warnings after compiling TripleX.cpp

I am getting warnings and other gibberish after i compile my hello world… the exe still runs fine though.

UPDATE - After a google search i tried compiling with /EHsc - and it worked. Then I found an article here in gamedev.tv that basically said the same thing. I will need to use this switch in visual studio code.

------- compiling window below

Microsoft Windows [Version 10.0.19041.804]
© 2020 Microsoft Corporation. All rights reserved.

C:\Users\JAM_01_19_E\Desktop\Unreal\CiNTRO>cl TripleX.cpp
Microsoft ® C/C++ Optimizing Compiler Version 19.28.29337 for x86
Copyright © Microsoft Corporation. All rights reserved.

TripleX.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\ostream(746): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
TripleX.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
Microsoft ® Incremental Linker Version 14.28.29337.0
Copyright © Microsoft Corporation. All rights reserved.

/out:TripleX.exe
TripleX.obj

C:\Users\JAM_01_19_E\Desktop\Unreal\CiNTRO>TripleX.exe
You forgot the combination code to unlock your car door
You need to get into the car before you freeze!
Enter the 3 digit code now before it is too late!
C:\Users\JAM_01_19_E\Desktop\Unreal\CiNTRO>

hi, im getting the same problem, did you end up figuring it out?

They have an edit in their OP, use /EHsc

cl triplex.cpp /EHsc
2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms