For very long time I was experiencing problems with Go To Definition in my project, but I was not able to find any common ground for them or to reproduce them in a small test case until now.
The problem is Goto definition seems not to able to find a defintion if the .cpp file is named differently from a .hpp file where the fucntion was defined. Such situation is quite common in my project and I often have to use built-in Goto definition instead, which is not convenient at all. Strange thing is that after using built-in Goto, VAX sometimes seems to cath-up somehow and it will find the very same definition on next attemp. (I have "Parse all files when opening a project" toggled on, but it does not seem to help).
I attach a small example:
classDef.hpp:
#ifndef _CLASS_DEF_HPP
#define _CLASS_DEF_HPP
class SomeClass
{
public:
void FunctionInFileClassDef(); /// goto definition works
void FunctionInFileClassExtend(); // goto defintion does not work
};
#endif
classDef.cpp:
#include "classDef.hpp"
void SomeClass::FunctionInFileClassDef()
{
}
int main()
{
return 0;
}
classExtend.cpp:
#include "classDef.hpp"
void SomeClass::FunctionInFileClassExtend()
{
}