In the file 'Catalogue.cxx' (Scintilla version 2.21), there is a std::vector 'lexerCatalogue'. It becomes initialized after 'Scintilla_LinkLexers' has added the lexers. The vector is empty afterwards. I use VS2005 and have changed SciLexer.vcproj to build a static library that is linked into my application. I also use the MFC wrapper made by PJ Naughter (version 1.25, it was updated with ConvertScintillaiface.js). I used the workaround described below.
static std::vector<LexerModule *> lexerCatalogue;
static std::vector<LexerModule *>& GetLexerCatalogue()
static std::vector<LexerModule *> lc;
#define lexerCatalogue GetLexerCatalogue()