We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我查看了已经关闭的Issue似乎没有人提出这一点
g++ -c main.cpp -o main
这样就可以得到可执行文件 main 了。
-c参数让编译器只进行编译操作,输出的结果不是可执行文件。事实上如果不通过-o参数指定生成文件的文件名,将会得到一个.o文件。 这是个很小的错误,但是对于我这样入门时即被误导使用VS2019等IDE的开发者来说,发现命令行返回“无法执行二进制文件:可执行文件格式错误”让我十分不解🥲
The text was updated successfully, but these errors were encountered:
对不起!不应该有-c的,那会生成.o文件,已修复。
Sorry, something went wrong.
No branches or pull requests
我查看了已经关闭的Issue似乎没有人提出这一点
g++ -c main.cpp -o main
-c参数让编译器只进行编译操作,输出的结果不是可执行文件。事实上如果不通过-o参数指定生成文件的文件名,将会得到一个.o文件。
这是个很小的错误,但是对于我这样入门时即被误导使用VS2019等IDE的开发者来说,发现命令行返回“无法执行二进制文件:可执行文件格式错误”让我十分不解🥲
The text was updated successfully, but these errors were encountered: