[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