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
 Syntax not recognized
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

foxmuldr
Tomato Guru

USA
417 Posts

Posted - Jun 18 2013 :  08:41:30 AM  Show Profile  Reply with Quote
The following code block is used in a header file shared by multiple source files. Only one source file defines and initializes them. The rest just declare external ignoring the initialization.

This syntax works in Visual Studio 2008 and compiles correctly, but gnNextUniqueId, gsemUniqueIdAccess, and gsLinkListRoot, are not being recognized in Visual Assist X (version shown below -- the latest I have installed).

They appear as non-syntax-highlighted keywords that I can right-click on and "Go to declaration" just fine. And they show up in the Code Definition Window just fine. But, they are not highlighted by Visual Assist X, nor do they appear in auto-completion, but they all appear as keywords that have misspellings:

Best regards,
Rick C. Hodgin



#ifndef _isExtern
    #define _isExtern
//else in other source files, already defined as:
//  #define _isExtern extern
#endif


#ifndef _initialize
    #define _initialize(...) = __VA_ARGS__
//else in other source files, already defined as:
//  #define _initialize(...)
#endif


_isExtern    int                 gnNextUniqueId       _initialize(0);
_isExtern    CRITICAL_SECTION    gsemUniqueIdAccess;
_isExtern    void*               gsLinkListRoot       _initialize(NULL);





Version:
VA_X.dll file version 10.7.1929.0  built 2013.02.22
Licensed to:
  VA X: [snip] (2-user license) Support ends 2013.03.12
DevEnv.exe version 9.0.30729.1 Professional
msenv.dll version 9.0.30729.1
Font: Consolas 11(Pixels)
Comctl32.dll version 6.0.3790.4770
Windows Server 2003 5.2 Build 3790 Service Pack 2
Single processor (x86)
Language info: 1252, 0x409

Platform: Win32
Stable Includes:
E:\\Program Files\\VS2008\\VC\\include;
E:\\Program Files\\VS2008\\VC\\atlmfc\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;

Other Includes:

Stable Source Directories:
E:\\Program Files\\VS2008\\VC\\atlmfc\\src\\mfc;
E:\\Program Files\\VS2008\\VC\\atlmfc\\src\\mfcm;
E:\\Program Files\\VS2008\\VC\\atlmfc\\src\\atl;
E:\\Program Files\\VS2008\\VC\\crt\\src;


Edited by - foxmuldr on Jun 18 2013 09:12:58 AM

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Jun 18 2013 :  6:52:46 PM  Show Profile  Reply with Quote
Can you please create a "va_stdafx.h" file, in the same directory as your solutions .SLN file, as explained in this FAQ entry:

http://docs.wholetomato.com?W302

and add the following two lines to the "va_stdafx.h" file:

#define _isExtern
#define _initialize(x)

I have done this here, and rebuild my VA symbol database, and this has fixed the problem with your sample code, so hopefully this will fix this problem in your solution.

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

foxmuldr
Tomato Guru

USA
417 Posts

Posted - Jun 18 2013 :  7:07:36 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline

Can you please create a "va_stdafx.h" file, in the same directory as your solutions .SLN file, as explained in this FAQ entry:

http://docs.wholetomato.com?W302

and add the following two lines to the "va_stdafx.h" file:

#define _isExtern
#define _initialize(x)

I have done this here, and rebuild my VA symbol database, and this has fixed the problem with your sample code, so hopefully this will fix this problem in your solution.



That fixed it. Much appreciated.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Jun 18 2013 :  7:11:11 PM  Show Profile  Reply with Quote
Excellent, thank you for the update If you have any other problem macros then adding similar lines to the va_stdafx.h file will hopefully fix those as well. If not, please let me know and I will do what I can to help.

zen is the art of being at one with the two'ness
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