我有一个makefile:
all: hello.cpp
cl /EHsc hello.cpp
在开发者powershell中,当我输入nmake时,我得到:
Microsoft (R) Program Maintenance Utility Version 14.28.29915.0
Copyright (C) Microsoft Corporation. All rights reserved.
cl /EHsc hello.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29915 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
hello.cpp
Microsoft (R) Incremental Linker Version 14.28.29915.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:hello.exe
hello.obj
有没有不展示的方法
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29915 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
和
Microsoft (R) Incremental Linker Version 14.28.29915.0
Copyright (C) Microsoft Corporation. All rights reserved.
只是显示
Microsoft (R) Program Maintenance Utility Version 14.28.29915.0
Copyright (C) Microsoft Corporation. All rights reserved.
cl /EHsc hello.cpp
hello.cpp
/out:hello.exe
hello.obj
或类似的东西。我只是希望微软的横幅不显示,因为他们采取不必要的行。
### @dxiv在评论中建议/nologo
flag seems to have worked. The modified makefile i旗帜似乎起了作用。修改后的makefile为:
all: hello.cpp
cl /EHsc /nologo hello.cpp
在开发人员powershell上的输出是:
Microsoft (R) Program Maintenance Utility Version 14.28.29915.0
Copyright (C) Microsoft Corporation. All rights reserved.
cl /EHsc /nologo hello.cpp
hello.cpp
我不知道为什么微软认为有必要在默认情况下显示这个(编译器版本和版权信息)信息,因为这是完全不必要的。如果我需要编译器版本进行调试,我应该能够执行类似cl -v的操作,类似于用于UNIX的g++。更多的旗帜可以在这里找到。