T O P I C R E V I E W |
jmatthias |
Posted - Apr 04 2006 : 3:44:15 PM This problem has bugged me for a long time.
The compiler tells me that there is a symbol conflict and it gives me the name of a .h file. But this include file is included by a nested include file. Is there anything VA can do for me. I just want a list of files starting with the .CPP file showing me how the included file reported in the compiler error got included e.g.
I'm compiling foo.cpp and the compiler reports an error in bar.h, the list would look like
foo.cpp a.h b.h bar.h
i.e. foo.cpp includes a.h which includes b.h which includes bar.h
Thanks - Joel |
12 L A T E S T R E P L I E S (Newest First) |
peterchen |
Posted - Apr 20 2006 : 04:08:31 AM I used IncludeFinder a few times for that, starting with the .cpp file the compiler is currently working at. Yes, it'sa huge tree, maybe you want to give it another try :) |
feline |
Posted - Apr 05 2006 : 2:54:36 PM when the 15xx builds reach beta they include a "find references" tool as part of the C++ refactoring support. this should help you to identify all .h files with the duplicate symbol. the real question becomes, will this help, since it will not provide the include path.
do you address these problems by trying to remove the duplicate symbols, or are you limited to trying to fix the #include list? |
jmatthias |
Posted - Apr 04 2006 : 5:53:48 PM No it's not as complicated as a circular include. It just a deeply nested include and sometimes it's hard to figure out how the duplicate symbols were included.
The /showincludes option mentioned solves the problem because you can find the include file mentioned in the compiler error and see how the the conflicting symbol (in a different include file) was included. |
rhummer |
Posted - Apr 04 2006 : 5:44:31 PM I would presume its a circular include problem? |
feline |
Posted - Apr 04 2006 : 5:42:13 PM when you say a "symbol conflict" what do you mean? if ultimately you are trying to find where something is defined, or referenced, then this *might* be an easier problem. |
rhummer |
Posted - Apr 04 2006 : 5:21:46 PM Ah, sorry forgot to mention its in .NET :/ |
jmatthias |
Posted - Apr 04 2006 : 5:12:09 PM Looks like it's VS.NET, alas we are stuck in the 20th century and are using VS6. |
jmatthias |
Posted - Apr 04 2006 : 5:07:35 PM Which version of Visual Studio are you using? |
rhummer |
Posted - Apr 04 2006 : 5:04:04 PM You can have the Compiler show all the includes per file when it compiles a file.
Configuration Properties -> C/C++ -> Advanced -> Show Includes it will list the includes in a tabed tree forum in the out put window.
Hope that may be of some he lp. |
support |
Posted - Apr 04 2006 : 4:50:21 PM This one is hard to resolve since final includes paths, order of files compiled, and what is and is not #defined (and hence #included,) isn't determined until compile time.
We appreciate the request but we think the solution fail with any project beyond simple. |
jmatthias |
Posted - Apr 04 2006 : 4:33:14 PM I did find this utility before I posted but it didn't do what I wanted it to. If I gave it the name of the include file stated in the compiler error message it didn't find anything and if I gave it the name of the source .CPP file it gave me a huge tree of every include file and I would have to examine the whole tree to find the file.
Thanks anyway. |
feline |
Posted - Apr 04 2006 : 4:26:54 PM this might help
http://www.codeproject.com/tools/includefinder.asp |