【问题标题】:Is there an analog to Compiler Flags from Code Blocks in Visual Studio?Visual Studio 中代码块中的编译器标志是否有类似物?
【发布时间】:2020-06-14 04:31:09
【问题描述】:

我刚刚开始了关于创建键盘记录器的课程,我遇到的第一个功能是让控制台消失:

#include <iostream>
#include <windows.h>

using namespace std;

int main() {
    MSG Msg;

    while (GetMessage(&Msg, NULL, 0, 0)) {
        TranslateMessage(&Msg);
        DispatchMessage(&Msg);
    }
}

讲师正在使用代码块,并说我们需要在代码块的控制台标志菜单中添加一个控制台标志“-mwindows”,但我既没有找到“控制台标志”也没有找到替代品Visual Studio 中的选项。

【问题讨论】:

  • 项目 -> 属性 -> C/C++。此外,如果您的讲师没有使用 Visual Studio 编译器,那么标志可能会有所不同。
  • @BessieTheCow 有没有办法找到类似于 Visual Studio 代码块中使用的标志?
  • 首先,Code Blocks 是一个编辑器,而不是编译器。使用的标志取决于编译器。您需要弄清楚该标志对您的讲师使用的任何编译器有什么作用,并在 Visual Studio 中搜索哪些标志做同样的事情。

标签: c++ windows visual-studio console


【解决方案1】:

我一直在挖掘更多,找到了答案here

由于添加标志的目的是启用阻止控制台出现的选项,因此此解决方案就足够了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-12-14
    • 1970-01-01
    • 2021-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-03
    相关资源
    最近更新 更多