C++ 有人能帮我理解这个错误信息吗?

C++ 有人能帮我理解这个错误信息吗?,c++,makefile,C++,Makefile,我目前正在从头开始创建一个虚拟机。我在网上找到了一个视频,我跟踪了它,但是当我编译C++程序的时候,这个家伙说要运行“make”命令来编译它。我使用我的Visual Studio Developer命令提示符使用了NMake,它给了我以下错误消息: cl -std=c++11 -c stack-vm.cpp Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29112 for x86 Copyright (C) Microsoft Cor

我目前正在从头开始创建一个虚拟机。我在网上找到了一个视频,我跟踪了它,但是当我编译C++程序的时候,这个家伙说要运行“make”命令来编译它。我使用我的Visual Studio Developer命令提示符使用了NMake,它给了我以下错误消息:

cl -std=c++11 -c stack-vm.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29112 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
stack-vm.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\ostream(285): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\ostream(270): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)'
stack-vm.cpp(53): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)' being compiled
stack-vm.cpp(49): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
        cl -std=c++11 -c main.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29112 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
main.cpp
        cl -std=c++11 stack-vm.o main.o -o stack-vm
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29112 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9024 : unrecognized source file type 'stack-vm.o', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'main.o', object file assumed
Microsoft (R) Incremental Linker Version 14.27.29112.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:stack-vm.exe
/out:stack-vm.exe
stack-vm.o
main.o
LINK : fatal error LNK1181: cannot open input file 'stack-vm.o'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x86\cl.EXE"' : return code '0x2'
Stop.
cl-std=c++11-c stack-vm.cpp
针对x86的Microsoft(R)C/C++优化编译器版本19.27.29112
版权所有(C)微软公司。版权所有。
cl:命令行警告D9002:忽略未知选项'-std=c++11'
stack-vm.cpp
程序文件(x86)\微软Visual Studio \\\Calue\VC\Too\MSVC\1427.29 110包含“oSoSrand”(285):警告C45 30:C++异常处理程序,但未启用展开语义。指定/EHsc

C:\Program Files(x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\ostream(270):注意:在编译类模板成员函数“std::basic\u ostream&std::basic\u ostream::operator时,语法是
/std:C++11
,而不是
-std=C++11
。好的,我会尝试一下。谢谢大家!<代码>那家伙说要运行“make”命令。。。我使用了NMake
它们不是同一件事,而且这看起来不像是为使用VC++编译器编写的makefile。那么我能做什么呢?有什么建议吗?@euneum标准/原生VC++项目不是基于makefile的。在VS中转到File/New/Project,从简单的东西开始,比如Win32控制台应用程序。然后你可以添加代码和文件,不过如果你不熟悉这个环境,你应该为学习曲线做好准备。语法是
/std:c++11
,而不是
-std=c++11
。好的,我会试试。谢谢大家!<代码>那家伙说要运行“make”命令。。。我使用了NMake它们不是同一件事,而且这看起来不像是为使用VC++编译器编写的makefile。那么我能做什么呢?有什么建议吗?@euneum标准/原生VC++项目不是基于makefile的。在VS中转到File/New/Project,从简单的东西开始,比如Win32控制台应用程序。然后,您可以向其中添加代码和文件,尽管如果您不熟悉环境,您应该为学习曲线做好准备。