Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to navigate to source code in linked libraries in Clion?

Tags:

c++

clion

I have a project that links multiple static libs (e.g. libModule.a). When I try to navigate to classes inside the Module lib, Clion takes me only to the header declaration and stops navigation there. I want to be able to dig into the definition of functions inside the Module lib.

like image 269
abhijit Avatar asked Nov 10 '15 00:11

abhijit


1 Answers

I had the same problem and here is what I did. In Clion I enabled debug logging by entering #com.jetbrains.cidr.execution.debugger into Help | Debug Log Settings, reproduced the problem and then looked at the idea.log created (Help | Show Log). In the log it showed the full path to the source it could not find. The source on my box was not in the same place, so by creating a symbolic link in the appropriate directory I was able to have Clion find it by the full path it was looking for.

like image 131
Keith Trummel Avatar answered Nov 14 '22 21:11

Keith Trummel