How do I open #include<file.h>

Answered

How do I open the #include<file.h> that my cursor is on?

In VSCode I can just "Go to definition" [F12]. What is it in CLiion?

0
5 comments

Hello!

Go to Definition should work in CLion in this case too. The shortcut depends on the keymap you use, please find it here https://www.jetbrains.com/help/clion/navigating-through-the-source-code.html#go_to_implementation.

0

It's not working for me.

I have my cursor on the #include<file.h> line and none of the options does anything. I've even tried it with the file open in another tab and nothing happens.

The project has the include file in it. I just want to open the header file under the cursor, a basic action.

0

On what build system is your project based?

Please create a default "Hello, World!" project (`File | New Project` > `C++ Executable` > `Create`), put cursor on iostream, right-click and choose Go To > Definition. Does it work?

0

It's a very large project, header files and source files are in different directory structures.

The Project is able to list all the files and directories. It links to the Git repository without any issue.

The test project worked.

0

You didn't answer my question. On what build system is your project based? CMake? Makefile? Some other?

0

Please sign in to leave a comment.