Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 std::vector incorrectly marked as mistyped
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

finsprings
Junior Member

USA
11 Posts

Posted - Nov 15 2006 :  2:43:41 PM  Show Profile  Reply with Quote
When I refer to "std::vector" in my code it gets underlined as if it was mistyped. If I instead specify "using namespace std;" and then just refer to vector without the namespace prefix it doesn't highlight it.

Is there a way to to VAX to understand the namespace prefix?

I tried rebuilding symbols but that didn't help. This is with 10.3.1540.0 and Visual Studio 6.

Thanks,
Dave

Edited by - finsprings on Nov 15 2006 2:58:08 PM

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Nov 15 2006 :  3:11:24 PM  Show Profile  Reply with Quote
That should not happen. It is not underlined for me.

Does the code actually compile?
Are you seeing the problem in more than one file or workspace?
If you hover the mouse over "vector" in "std::vector" what does the HCB (bottom half of VAView) show, if anything?

zen is the art of being at one with the two'ness
Go to Top of Page

finsprings
Junior Member

USA
11 Posts

Posted - Nov 15 2006 :  4:03:45 PM  Show Profile  Reply with Quote
It doesn't just happen with vector and it happens in multiple files. It does it with std::string and others too.

The code compiles and runs properly.
I see it in multiple files in Visual Studio 6 and in EVC4.0SP4.
If I hover over vector the HCB doesn't change. If on "std::vector<char> myVar;" I hover over myVar, the HCB changes to show std::vector's methods, attributes etc, even though the vector part of my line is still underlined.

The strange thing is that if I open a file with this issue it will not always show vector underlined, but if I edit the file it does eventually get underlined again. The most repeatable way seems to be:

1. change the line so it contains std::vectors instead of std::vector
2. wait for it to be correctly marked as mistyped.
3. remove the 's' from the end so it is back to std::vector again. At this point all other similar lines in the file will start showing as being mistyped too.
4. it still shows as mistyped, and reparsing the file doesn't help.

It's as if VA X is implicitly parsing the file at some point as I work on it, and when it does that it decides to underline vector et al.
Go to Top of Page

jorgito11
Senior Member

USA
29 Posts

Posted - Nov 15 2006 :  8:12:17 PM  Show Profile  Reply with Quote
I have found the same thing happening with me too! However, I had both VS 2003 and 2005 installed. The SDK files of 2003 were listed as stable custom include files in VS 2005. Once I deleted that and did a CLEAR and a REBUILD, the problems went away as far as I know.

Edited by - jorgito11 on Nov 15 2006 8:13:09 PM
Go to Top of Page

finsprings
Junior Member

USA
11 Posts

Posted - Nov 16 2006 :  09:33:45 AM  Show Profile  Reply with Quote
Interesting. I have Visual Studio 6, 2003 and 2005, and I also have the SDK in my include list in all of them (necessarily unfortunately). Maybe that has something to do with it.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Nov 16 2006 :  1:23:53 PM  Show Profile  Reply with Quote
VA does not attempt to underline mistyped symbols until you edit a file, this is an optimisation to speed things up if you are simply opening and reading files without editing them.

finsprings a rebuild may be worth a try.

VA Options -> Performance -> General -> Rebuild symbol databases

when you type std::ve does VA suggest vector?
I have tried changing between std::vectors and std::vector and I am not seeing any underlining on vector.

zen is the art of being at one with the two'ness
Go to Top of Page

finsprings
Junior Member

USA
11 Posts

Posted - Nov 16 2006 :  1:46:00 PM  Show Profile  Reply with Quote
I tried a rebuild, but it didn't help. std::ve does not sugggest anything. Even just std:: only suggests a very small, and strange list: _Doraise(), _m_doFree, _m_what, exception, operator=, runtime_error, what, ~exception, ~runtime_error

Some of the projects in my workspace have Dinkumware's standard library include directories on their include path, so perhaps that has something to do with it. Those directories are not in "stable include files" though.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Nov 16 2006 :  1:51:02 PM  Show Profile  Reply with Quote
Can you please go to:

VA Options -> About -> Copy Info

and paste the details (from the clipboard) into this thread. This will give us the basic information about your setup.

For reference using VC6 and VA 1540 I am seeing this:


zen is the art of being at one with the two'ness
Go to Top of Page

finsprings
Junior Member

USA
11 Posts

Posted - Nov 16 2006 :  2:07:53 PM  Show Profile  Reply with Quote
VA_X.dll file version 10.3.1540.0 built 2006.10.27
Licensed to:
VA X: xxxxxxx (1-user license) Support ends 2007.11.11
VAOpsWin.dll version 1.3.3.7
VATE.dll version 1.0.5.9
MSDev.exe version 6.0.9782.1
Devshl.dll version 6.0.9782.0
Devedit.pkg version 6.0.9782.0
Font: Lucida Console 13(Pixels)
Comctl32.dll version 5.82.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
Single processor

Platform: Win32 (x86)
Stable Includes:
C:\\PROGRAM FILES\\MICROSOFT PLATFORM SDK\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\ATL\\INCLUDE;
C:\\PROGRAM FILES\\MICROSOFT VISUAL STUDIO\\VC98\\INCLUDE\\SYS;
C:\\Program Files\\Common Files\\Microsoft Shared\\Windows CE Tools\\Platman\\sdk\\platman\\include;
C:\\Program Files\\Common Files\\Microsoft Shared\\Windows CE Tools\\Platman\\sdk\\wce420\\platman\\include;

Library Includes:
C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\SRC;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\ATL\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\CRT\\SRC;

Other Includes:

Go to Top of Page

finsprings
Junior Member

USA
11 Posts

Posted - Nov 16 2006 :  2:10:00 PM  Show Profile  Reply with Quote
The same happens with EVC4.0SP4. Here's the info from that program.

VA_X.dll file version 10.3.1540.0 built 2006.10.27
Licensed to:
VA X: xxxx (1-user license) Support ends 2007.11.11
VAOpsWin.dll version 1.3.3.7
VATE.dll version 1.0.5.9
evc.exe version 4.0.1610.0
Devshl.dll version 4.0.1610.0
Devedit.pkg version 4.0.1610.0
Font: Lucida Console 13(Pixels)
Comctl32.dll version 5.82.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
Single processor

Platform: Win32 (WCE ARMV4)
Stable Includes:
C:\\Program Files\\Windows CE Tools\\wce420\\POCKET PC 2003\\Include\\ARMV4;
C:\\Program Files\\Windows CE Tools\\wce420\\POCKET PC 2003\\mfc\\include;
C:\\Program Files\\Windows CE Tools\\wce420\\POCKET PC 2003\\atl\\include;
C:\\PROGRAM FILES\\PSION TEKLOGIX\\SDK V1.08\\MOBILE DEVICES\\CPP;
C:\\PROGRAM FILES\\PSION TEKLOGIX\\WORKABOUT PRO HDK V1.01\\API\\CPP;

Library Includes:
C:\\Program Files\\Windows CE Tools\\wce420\\POCKET PC 2003\\mfc\\src;
C:\\Program Files\\Windows CE Tools\\wce420\\POCKET PC 2003\\atl\\src;
C:\\Program Files\\Windows CE Tools\\wce420\\POCKET PC 2003\\mfc\\include;
C:\\Program Files\\Windows CE Tools\\wce420\\POCKET PC 2003\\atl\\include;

Other Includes:

Go to Top of Page

finsprings
Junior Member

USA
11 Posts

Posted - Nov 16 2006 :  2:12:49 PM  Show Profile  Reply with Quote
In VS6 I tried opening a smaller workspace that doesn't have Dinkumware directories in its include path. Typing "std::ve" popped up a similar suggestion list to the one you see.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Nov 17 2006 :  4:48:45 PM  Show Profile  Reply with Quote
Is it this Dinkumware?

http://www.dinkumware.com/

I am not seeing any sign of a trial download, which makes perfect sense given what they are selling. This could make this a little difficult to test / reproduce.

zen is the art of being at one with the two'ness
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Nov 19 2006 :  5:40:15 PM  Show Profile  Reply with Quote
Dinkumware is the author of the STL that is used in Visual Studio.

finsprings: when you say that you opened a smaller workspace that doesn't have Dinkumware directories in the include path, what do you mean? I don't see an explicit reference to Dinkumware in any of the settings you posted.

Joe Pizzi
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Nov 20 2006 :  08:48:04 AM  Show Profile  Reply with Quote
jpizzi I spotted that piece of information on their website myself, but this problem appears to be specific to their full STL library.

I think finsprings means that he added these directories to the projects C++ additional include directories setting.

zen is the art of being at one with the two'ness
Go to Top of Page

finsprings
Junior Member

USA
11 Posts

Posted - Nov 22 2006 :  2:23:29 PM  Show Profile  Reply with Quote
Yes, we're using the full version of the Dinkumware Standard Library from dinkumware.com. Microsoft OEM's this from Dinkumware (PJ Plauger's company) but doesn't always use the newest version of it.

To use dinkum's library over the Microsoft one involves setting the include paths to prefer the dinkum directories over the Microsoft ones. This is done in our projects' settings, so doesn't show up in the dump I sent. The other workspace I opened didn't have the dinkum directories in its include paths.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Nov 24 2006 :  12:08:39 PM  Show Profile  Reply with Quote
Which namespace does the Dinkumware library use? I am guessing "std" but I don't know.

Can you try just adding a #include line for the Dinkumware vector class to a test project that does not know about Dinkumware and see what effect this has? I am working on the theory that there is something in one of their headers that is confusing our parser, but we need to pin it down.

zen is the art of being at one with the two'ness
Go to Top of Page

finsprings
Junior Member

USA
11 Posts

Posted - Nov 24 2006 :  12:24:17 PM  Show Profile  Reply with Quote
Yes, dinkum uses std: it's a full Standard Library (STL+streams) implementation so you can use it with compilers that don't come with one, or you can use it instead of the one that comes with your compiler, as is the case for us.

I'm off today but I'll try out a test project with Dinkumware's vector header on Monday. I don't know if I can just include that one header, since it will include others and on and on, and you can't mix and match, but I'll try and get it to as minimal a test case as I can.

Cheers,
Dave
Go to Top of Page

finsprings
Junior Member

USA
11 Posts

Posted - Nov 28 2006 :  5:02:10 PM  Show Profile  Reply with Quote
I was able to try a minimal app:
1) created a console hello world app in Visual Studio 6
2) added a vector to the main source file
3) put the dinkum include directories into the Tools\\Options\\Directories\\Include files section at the top of the list
4) checked "Ignore standard include paths" in project settings
5) quitted out and restarted VS6
6) verified ALT-G on vector took me to dinkum vector header
7) vector wasn't underlined but didn't show up in the VA View on hover.
8) I changed std::vector to std::cake and it didn't underline it either, but it did make it black instead of blue.
9) I removed std:: from the front of cake and it got underlined.

I then did a similar test with Embedded Visual C++ 4. It did almost the same thing, but I couldn't get it to underline anything - "cake" was black but not underlined even after several quits and restarts. I have both set to "underline mistyped symbols using maroon".
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Nov 28 2006 :  5:55:15 PM  Show Profile  Reply with Quote
Can you try modifying this test project to remove the IDE setting for the dinkum include directories and include the dinkum vector header directly?

Since there is no demo version of these header files available it leaves us in the difficult position of not being able to test the library files directly ourselves.

The underlining not showing up, it is an optimisation that VA will not do any underlining until you start to edit the file, so that this does not slow you down if you are just reading code, so this may be why you did not see any underlining at first.

zen is the art of being at one with the two'ness
Go to Top of Page

finsprings
Junior Member

USA
11 Posts

Posted - Nov 29 2006 :  09:38:10 AM  Show Profile  Reply with Quote
I took out the IDE setting and included "...fullpathtodinkum\\vector" as you suggested.

The VA View was still able to recognize vector on hover and CTRL-SPACE suggested vector's methods. ALT-G correctly wanted to go to the dinkum vector header.

I edited the file until I saw some underlining on intentionally made-up variable names. It did not underline "std::vectors" but it did underline the "cheese" in "std::vectors<cheese>":


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000