I needed to add a tag file

I’m trying out SlickEdit as my C++ code editor.  There are cool things it enables you to do quickly with keyboard shortcuts.  I have seen co-workers do enough that I was convinced to try it.

So far, though, I’m a SlickEdit newbie, so when I tried to navigate from a use of a class class name to the definition of the class and got errors like this:


I wasn’t sure what to do.  I did rebuild the tag file(s), seemingly to no effect.


According to the SlickEdit help file, tag files are “a database of symbol definitions and declarations®” — basically it lets you jump around from a symbol definition to references to that symbol, and from a symbol reference to its definition.  And I lacked an understanding of the current state of my tag files.

Understanding, Solving

I read the help for context tagging.  You can have multiple tag files: one for your compiler’s libraries (which I already had); and other “language-specific tag files”.

I could jump between reference and definition for symbols defined in my current project, and for symbols defined in the C++ standard library, but not for symbols defined in our own shared libraries (which is what I needed most of the time).  Aha!  I needed to create a tag file for our shared libraries, having SlickEdit process the include directory of shared headers.  I did this; now I can navigate to definitions that are in our shared libraries.

Then I found it in the help page that I had been reading:

You should create a language-specific tag file for any library that is not a compiler-specific library or part of the codebase you are editting. For example, you may have local libraries that are reused from project to project.

I think the reason you don’t have to create a tags file for the part of the codebase you are editing is that for that part you would have a SlickEdit project file and I think that handles the tagging automatically.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.