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;