我在嘗試在eclipse中運行C++項目時遇到問題。無法在eclipse中作爲C++項目運行
我發現了幾個解決方案的頁面,但都沒有工作。
The program file specified in the launch configuration does not exist
Launch Failed. Binary not found. CDT on Eclipse Helios
程序編譯:
08:52:36 **** Build of configuration Debug for project testcpp ****
make all
Building file: ../test.cpp
Invoking: Cross G++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -std=c++11 -MMD -MP -MF"test.d" -MT"test.d" -o "test.o" "../test.cpp"
Finished building: ../test.cpp
Building target: testcpp.exe
Invoking: Cross G++ Linker
g++ -pthread -o "testcpp.exe" ./test.o
Finished building target: testcpp.exe
08:52:38 Build Finished (took 1s.664ms)
和文件testcpp.exe
是debug文件夾裏面,但是當我運行Run as
- >Local C/c++ Application
它顯示的錯誤Launch Failed. Binary not found.
事情是我可以點擊Run
,它的工作原理。
有什麼想法?
Eclipse版本:
的Eclipse IDE爲C/C++開發
版本:露娜服務版本1(4.4.1) 版本ID:20140925-1800
平臺: Windows 7 64bits。
「調用:跨G ++編譯器」文本讓我猜測您正在爲另一個目標創建程序,而不是您正在使用的本地平臺。所以當你試圖以「本地應用程序」運行時,它試圖運行該程序,因爲它是本地的,但它不是。當你「運行」它時,你可能會在某種模擬器中啓動它。請注意,我只是在猜測,因爲我已經很多年沒有使用Eclipse了。 – 2014-10-31 08:02:54
你使用哪個平臺?交叉編譯可能是有意義的,如果它是運行在Windows上的g ++ – Eric 2014-10-31 08:05:30
是的,我在windows上運行並且目標交叉g ++,因爲它是我可以使用-pthread運行的唯一一個。我會用這個信息更新這個問題。 – blfuentes 2014-10-31 08:06:56