Author |
Topic |
|
harafeh
Starting Member
1 Posts |
Posted - Aug 17 2004 : 12:53:17 PM
|
I'm using VAssistX with Visual Studio .Net 2003 and C++. I cannot get "Goto Implementation" to see files outside of the current project (we have many projects that call each other's code). I added the other project's header and cpp directories to projects/custom platform under "Other Include Files" and source files but it made no difference.
Is this a known problem or am I doing something wrong?
thanks |
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Aug 17 2004 : 3:44:26 PM
|
using .NET 2002 with VAX 1246 i am using Qt, a 3rd party C++ library, and alt_g (VAX goto) is jumping into the library code for me.
the library files have not been added to my project, but they are being parsed by VAX.
in VAX options -> projects -> C/C++ directories
i have added the Qt library to my stable includes list. also, in the IDE project settings C/C++ -> General -> Additional Include Directories
i have added the Qt include directory.
assuming you have class fruit in one of these libraries, does VAX offer you any help with:
fruit foo; specifically, is fruit coloured as a class? what info do you get in the VAX wizard bar when you hover the mouse over "foo"?
i am wondering if VAX has even found these other libraries. if it hasn't found and parsed the code the goto is unlikely to work. |
zen is the art of being at one with the two'ness |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Aug 18 2004 : 2:43:22 PM
|
VA X sees headers in "Other Include Files" only if you #include them, or they are #included by something else you #include. To make VA X see implementations without requiring a #include, add your source directories to "Source files", not "Other Include Files," in our options dialog.
See the bottom of: http://www.wholetomato.com/products/features/directories.html?more=yes |
|
|
kevinsikes
Tomato Guru
USA
271 Posts |
Posted - Aug 26 2004 : 11:56:36 AM
|
Here's another twist to this issue. If the implementation is found in a source file that IS in fact part of the current project, but the prototype is not found in a header, but rather in the source file that calls the function, then Alt+G always goes to the prototype. For example:
FileOne.cpp
-----------
#include <windows.h>
int foo(); // implementation found in FileTwo.cpp
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
return foo(); // Alt+G here takes you to the prototype above
}
FileTwo.cpp
-----------
int foo()
{
return 0;
} I realize that best practices dictate that prototypes should be found in headers, but changing a header often triggers a lengthy recompile of the entire project, and it's easier to stick a down and dirty prototype in the file that calls the function to satisfy the compiler.
Is this a known issue for which I have not searched the forum hard enough, or is it a bug? I have found it in VAX 1246 for VC6 and VA 1106 for VC6. I have not tried it in .NET.
|
Kevin Sikes Infotainment Platform Design Engineer Ford Motor Company |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Aug 27 2004 : 5:32:12 PM
|
reproduced in .NET 2002 with VAX 1246. case=244 |
zen is the art of being at one with the two'ness |
Edited by - feline on Sep 02 2004 07:52:13 AM |
|
|
jpizzi
Tomato Guru
USA
642 Posts |
Posted - Aug 27 2004 : 11:49:55 PM
|
Shouldn't that be:
extern int foo();
Does that change VA's behavior? |
Joe Pizzi |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Aug 28 2004 : 09:50:31 AM
|
the normal argument at times like this is VAX should support peoples normal coding style, and not force them to change how they work.
i certainly add a lot of local prototypes to my pure C code, in order to solve compiler warnings. often the functions aren't prototyped, or including the correct header breaks something else
but then, our old C code is a bit on the messy side *shrug*
adding extern to my test C++ code does not change anything, VAX still only jumps to the prototype. |
zen is the art of being at one with the two'ness |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Aug 28 2004 : 09:54:49 AM
|
kevinsikes, in .NET 2002 you can right click on the function call and select "go to definition"
for me this isn't as fast as VAX's goto, but it does work. if it works for you in VC6 then this is a work around for now. |
zen is the art of being at one with the two'ness |
|
|
kevinsikes
Tomato Guru
USA
271 Posts |
Posted - Sep 01 2004 : 12:55:56 AM
|
feline, I am using the IDE's "goto definition" feature in VC++ 6.0 as a workaround, but it requires altering the build settings to generate a browse information (.bsc) file, which can be annoying for large projects. Also, the (insert expletive of your choice) "Resolve Ambiguity" dialog pops up whenever the same method name exists in more than one class, even if those classes are not part of the same heirarchy! This makes it basically unusable.
It goes without saying that I MUCH prefer VA's "goto implementation" implementation! |
Kevin Sikes Infotainment Platform Design Engineer Ford Motor Company |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Sep 02 2004 : 07:55:12 AM
|
thats nasty hopefully WT will get to this sooner rather than later. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|