在 Visual Studio Community 中生成文件后,可执行文件在哪里?

Where is the executable after building the file in Visual Studio Community?

提问人:J Frey 提问时间:11/17/2023 更新时间:11/17/2023 访问量:40

问:

我在 C++ Visual Studio 社区中完成了 hello world 程序的构建。当我搜索可执行文件(据说会创建一个 .exe 文件)时,我无法找到。没有错误,程序运行良好。

我错过了什么?

C++ Visual-Studio 可执行文件

评论

2赞 PaulMcKenzie 11/17/2023
Visual Studio 中的“输出窗口”将显示已生成的文件的名称。
1赞 Retired Ninja 11/17/2023
通常位于解决方案文件所在目录下的 x64/Debug 或 x64/Release 目录中。如果要针对 32 位进行构建,则只需 Debug 或 Release 目录。

答:

0赞 Minxin Yu - MSFT 11/17/2023 #1

右键单击项目>属性:链接器->常规>输出文件:单击向下箭头,然后对其进行编辑。

您可以检查宏的值:$(OutDir)$(TargetName)$(TargetExt)

评论

0赞 Minxin Yu - MSFT 11/22/2023
嗨,@J弗雷,我可以知道你有没有机会检查我的答案吗?