Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 std::vector incorrectly marked as mistyped

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
finsprings Posted - Nov 15 2006 : 2:43:41 PM
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
19   L A T E S T    R E P L I E S    (Newest First)
finsprings Posted - Nov 29 2006 : 09:38:10 AM
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>":


feline Posted - Nov 28 2006 : 5:55:15 PM
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.
finsprings Posted - Nov 28 2006 : 5:02:10 PM
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".
finsprings Posted - Nov 24 2006 : 12:24:17 PM
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
feline Posted - Nov 24 2006 : 12:08:39 PM
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.
finsprings Posted - Nov 22 2006 : 2:23:29 PM
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.
feline Posted - Nov 20 2006 : 08:48:04 AM
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.
jpizzi Posted - Nov 19 2006 : 5:40:15 PM
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.
feline Posted - Nov 17 2006 : 4:48:45 PM
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.
finsprings Posted - Nov 16 2006 : 2:12:49 PM
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.
finsprings Posted - Nov 16 2006 : 2:10:00 PM
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:

finsprings Posted - Nov 16 2006 : 2:07:53 PM
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:

feline Posted - Nov 16 2006 : 1:51:02 PM
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:

finsprings Posted - Nov 16 2006 : 1:46:00 PM
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.
feline Posted - Nov 16 2006 : 1:23:53 PM
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.
finsprings Posted - Nov 16 2006 : 09:33:45 AM
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.
jorgito11 Posted - Nov 15 2006 : 8:12:17 PM
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.
finsprings Posted - Nov 15 2006 : 4:03:45 PM
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.
feline Posted - Nov 15 2006 : 3:11:24 PM
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?

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000