“No source file named” error debugging Eclipse CDT

后端 未结 7 1733
醉梦人生
醉梦人生 2020-12-31 03:25

I\'ve got a project with a shared library (loaded dynamically), and I\'m attempting to debug it. I get the following error message:

No source file named /ho         


        
7条回答
  •  灰色年华
    2020-12-31 04:00

    This can happen if you have both cygwin and mingw (or some other variant). If gcc from cygwin is used to compile the source you'll have cygwin path in executable. Then, if the debugger is from mingw, gdb will not be able to interpret the cygwin path. The easiest way to solve this is to go to Run -> Debug Configurations -> Debugger and set full path to cygwin gdb (C:\cygwin64\bin\gdb.exe). That solved the problem for me.

提交回复
热议问题