簡體   English   中英

GCC編譯器優化,無法與架構x86_64的主可執行文件“ _”鏈接

[英]GCC Compiler Optimizations, can't link with a main executable file '_' for architecture x86_64

*Antonio10ms$ gcc pi.c -o1 pi
ld: can't link with a main executable file 'pi' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我需要幫助,請對我的.cpp進行優化

我認為您正在將優化參數與輸出/目標參數混淆。

我想你想要的是

gcc pi.c -o1 -o pi

其中“ -o1”表示“優化級別1”,“-o pi”表示“輸出到名為pi的可執行文件”

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM