[C++] Solve "Cannot run program "gdb": Unknown reason" error


In Mac OSX,

The Issue Image:

1. Build the project on Eclipse successfully.

2. Run gdb on command line successfully. So the gdb has been installed on the Mac.

3. To run debug mode on Eclipse, the error appear:
  "Cannot run program "gdb": Unknown reason"

 

Analyse: Eclipse cannot find the gdb, then popups this error.

 

Solution:

1. Find the path of gdb on Mac. e.g. 

/usr/local/Cellar/gdb/7.12.1/bin/gdb

2. Preference -> C/C++ -> Debug -> GDB -> GDB debugger:

set the GDB debugger as the path of gdb, which is found on step1. 

The after Image should like:

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM