T O P I C R E V I E W |
mlaffin |
Posted - Aug 12 2009 : 5:42:24 PM I'm trying to setup third party source files that are not part of my solution for use in a VS2008 project. Unfortunately I am having issues with the GoTo feature. The function implementations in the cpp files are never found. GoTo will take me from the cpp to the h, but not from the h to the cpp.
I've tried: Clear History, Cache and temporary files Rebuild Symbol Databases The setting "Parse all files when opening a project" is turned on I've tried Reparse Current file
Nothing has worked to find the function implementations in the cpp files.
C/C++ Directories Settings: Stable Include Files C:\\Program Files\\Microsoft DirectX 9.0 SDK (April 2005)\\INCLUDE; C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include; C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\include; C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include; C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\common\\include; C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include; C:\\Program Files\\Microsoft SQL Server\\100\\SDK\\Include; C:\\Program Files\\BCGSoft\\BCGControlBarPro\\BCGCBPro;
Other Include Files No paths
Source Files C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc; C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\atl; C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\crt\\src; C:\\Program Files\\BCGSoft\\BCGControlBarPro\\BCGCBPro;
I thought that by adding the path BCGSoft... to the Source Files would have fixed this issue. Unfortunately it did not.
Some other comments:
When looking at the cpp file, alt-m works correctly. When I look at the Open File in Solution dialog, the files from C:\\Program Files\\BCGSoft\\BCGControlBarPro\\BCGCBPro are not present.
Any ideas on how I can get VAX to see the third party source files.
|
10 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Aug 28 2009 : 11:34:33 AM Since the problem only shows up after a while we can probably ignore the other plugin's and the anti virus, at least for now. If this was as "simple" as VA cannot find the 3rd party library files to parse them then you would always see the problem.
Instead it sounds more like something is confusing VA's parser over time, or it is coming across a second definition of a symbol, which is causing problems.
The code example you give, can you try adding this simple test case to a header file and see what happens when you try alt-g?
class FelineTestInstanceMacroAltG
{
FelineTestInstanceMacroAltG *GetInstance() { return NULL; }
void setChocolateHeight(int nHeight);
void setChocolateWidth(int nWidth);
};
#define FelineBlaMacroInstance FelineTestInstanceMacroAltG::GetInstance()
void testUsingFelineMacroInstance()
{
FelineBlaMacroInstance->setChocolateHeight();
}
its not brilliant code, but it should be enough to do an initial test
In your code what does VA show in the context and definition fields when you place the caret into "BlahMFC" and a function called via this #define? |
mlaffin |
Posted - Aug 27 2009 : 11:26:36 AM quote: Can you post the line / type / class you are using to test GoTo for files in the:
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;
directory? I can then test the same thing here, and see what happens for you.
Since the last time i rebuilt my symbol database, I haven't been able to reproduce issues with the files in
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;
I am, on the other hand, continuing to have intermittent issues with the files in:
C:\\Program Files\\BCGSoft\\BCGControlBarPro\\BCGCBPro;
The files that I'm having the most trouble with is somewhat larger then the rest of the files in that directory (.h is 83KB, .cpp is 514KB). The GoTo works great with this file right after I rebuild my symbol data base, but then at some point after, stops working.
I have noticed one situation where the GoTo never works with the BCGCBPro files:
There are a series of defines like: #define BlahMFC CBlah::GetInstance ()
and then function calls like: BlahMFC->OnDrawBlah();
The GoTo for OnDrawBlah never works.
quote: I don't recognise these other plugin's, so it is possible they are a factor. If they are widely used by other people running VA without any problems then it would be easier to dismiss them.
I'm not actively using these two plugins right now, so unless they are doing something in the background they probably aren't the issue.
quote: What anti-virus are you using? Very occasionally we see problems caused by anti-virus programs, so it is just possible something is stopping VA parsing these system header files correctly.
Symantec Anitvirus
|
feline |
Posted - Aug 17 2009 : 4:20:47 PM Can you post the line / type / class you are using to test GoTo for files in the:
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;
directory? I can then test the same thing here, and see what happens for you.
I don't recognise these other plugin's, so it is possible they are a factor. If they are widely used by other people running VA without any problems then it would be easier to dismiss them.
What anti-virus are you using? Very occasionally we see problems caused by anti-virus programs, so it is just possible something is stopping VA parsing these system header files correctly. |
mlaffin |
Posted - Aug 17 2009 : 09:36:09 AM quote: Does everything work correctly when this options is turned on? (after you open Do you use any other Visual Studio plug-ins?
Everything works correctly, for a while. Eventually the GoTo feature stops working with the files not in my solution. Also things seem to be slowed down, at least at start up time with the "VA Options -> Performance -> if solution is not empty" option turned on.
The other VS plugin I have are: Axialsi Icon Workshop Seapine TestTrack toolbar
quote: Did goto stop working also with your source files in your project?
No. Goto continues to work for the files in my project. |
accord |
Posted - Aug 14 2009 : 3:52:08 PM quote:
I have turned off the "VA Options -> Performance -> if solution is not empty" setting and tried to see if GoTo would work with files from
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;
GoTo failed for these files also. ( rebuilt my symbol database after turning of the setting)
Does everything work correctly when this options is turned on? (after you open Do you use any other Visual Studio plug-ins?
quote:
Also, I've had to rebuild my symbol database three times today as every so often the GoTo stops working.
Did goto stop working also with your source files in your project? |
mlaffin |
Posted - Aug 13 2009 : 6:22:58 PM This problem does not happen with files in my solution, only with files in the "Source Files" directories. I have turned off the "VA Options -> Performance -> if solution is not empty" setting and tried to see if GoTo would work with files from
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;
GoTo failed for these files also. ( rebuilt my symbol database after turning of the setting)
Also, I've had to rebuild my symbol database three times today as every so often the GoTo stops working. I haven't been able to figure out what I could be doing to make things stop working. |
feline |
Posted - Aug 13 2009 : 5:22:55 PM Something odd is going on here, since all of your settings seem correct. You should not have to turn on this option to make this work.
Did you only have this problem with files in the BCGControlBarPro library, or did it effect other code as well? I am wondering if there is something "odd" about these cpp files. |
mlaffin |
Posted - Aug 13 2009 : 10:52:48 AM All of the source files were in the directory...no subdirectories.
However, when I turned on
VA Options -> Performance -> if solution is not empty
and then cleared cache and rebuilt symbol dbs, things started working.
Thanks!
|
accord |
Posted - Aug 13 2009 : 10:41:33 AM It should work, but this parsing is NOT recursive, so the files should be in this directory, and not in subdirs (or the subdirs must be added one-by-one).
Another solution is to check
VA Options -> Performance -> if solution is not empty
It will parse all other unparsed files in the same dir. upon opening a file. So it will work after you open the first external (cpp) file. |
mlaffin |
Posted - Aug 13 2009 : 10:16:51 AM I'm using version 10.5.1727.0. |