每當我嘗試構建涉及I/O的C++程序時,我都會在Eclipse中遇到錯誤。無法在eclipse中編譯帶有輸入和輸出的C++程序
02:19:02 **** Incremental Build of configuration Debug for project SecondProject ****
make all
Building target: SecondProject
Invoking: GCC C++ Linker
g++ -o "SecondProject"
g++: fatal error: no input files
makefile:45: recipe for target 'SecondProject' failed
compilation terminated.
make: *** [SecondProject] Error 1
對於其他不需要用戶輸入的C++程序,它編譯得很好。
但是,我可以很好地編譯,當我使用命令行沒有問題。這是爲什麼發生?有沒有修復它?
與用戶輸入無關,您沒有任何源文件,這是問題 – Danh