[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:

《[C++] Solve

 

    原文作者:TonyYPZhang
    原文地址: https://www.cnblogs.com/TonyYPZhang/p/6643533.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞