“No source file named” error debugging Eclipse CDT

后端 未结 7 1659
醉梦人生
醉梦人生 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:04

    I had the same problem. I couldn't set a breakpoint in a shared library file (.so), compiled in a different place than my program. To fix this:

    1. Go to the Debug Configuration, Source tab
    2. Add a compilation directory (I used the location of the main makefile that compiles all processes, not where the makefile for this process is located).
    3. also click "Subdirectories are also used for compilation" (my subprocess makefile is compiled in a subdirectory of the main location)

    I haven't figured out how to make this change for all debug configurations future and past so that I don't have to add this directory every time, but I'll try to update later if I do figure that out.

    0 讨论(0)
提交回复
热议问题