trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2012

tqscintilla - am I missing something - or is that a gcc issue? - expected ')' before '*' token

From: "David C. Rankin" <drankinatty@...>
Date: Thu, 22 Mar 2012 13:12:51 -0500
Darrell, All,

  I ran into a build error with tqscintilla that looks like I'm missing
something or I have stumbled onto a gcc issue. The build proceeds normally for a
good while, then:

g++ -c -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/include/tqt
-I/opt/trinity/include -I/opt/tqt3/include -I/usr/include/tqt
-I/opt/trinity/include -I/opt/tqt3/include -I/usr/share/qt/mkspecs/linux-g++-64
-I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I../include
-I../src -I/usr/include/tqt -I. -o ExternalLexer.o ../src/ExternalLexer.cpp
In file included from ../src/ExternalLexer.cpp:22:0:
../src/ExternalLexer.h:25:30: error: expected ')' before '*' token
../src/ExternalLexer.h:27:30: error: expected ')' before '*' token
../src/ExternalLexer.h:29:31: error: expected ')' before '*' token
../src/ExternalLexer.h:29:31: error: expected initializer before '*' token
../src/ExternalLexer.h:30:29: error: expected ')' before '*' token
../src/ExternalLexer.h:31:30: error: expected ')' before '*' token
../src/ExternalLexer.h:38:2: error: 'ExtLexerFunction' does not name a type
../src/ExternalLexer.h:39:2: error: 'ExtFoldFunction' does not name a type
../src/ExternalLexer.h:52:27: error: 'ExtLexerFunction' has not been declared
../src/ExternalLexer.h:52:52: error: 'ExtFoldFunction' has not been declared
../src/ExternalLexer.cpp: In member function 'virtual void
ExternalLexerModule::Lex(unsigned int, int, int, WordList**, Accessor&) const':
../src/ExternalLexer.cpp:63:7: error: 'fneLexer' was not declared in this scope
../src/ExternalLexer.cpp:74:74: error: 'fneLexer' was not declared in this scope
../src/ExternalLexer.cpp: In member function 'virtual void
ExternalLexerModule::Fold(unsigned int, int, int, WordList**, Accessor&) const':
../src/ExternalLexer.cpp:82:7: error: 'fneFolder' was not declared in this scope
../src/ExternalLexer.cpp:93:75: error: 'fneFolder' was not declared in this scope
../src/ExternalLexer.cpp: At global scope:
../src/ExternalLexer.cpp:99:39: error: variable or field 'SetExternal' declared void
../src/ExternalLexer.cpp:99:39: error: 'ExtLexerFunction' was not declared in
this scope
../src/ExternalLexer.cpp:99:64: error: 'ExtFoldFunction' was not declared in
this scope
../src/ExternalLexer.cpp:99:89: error: expected primary-expression before 'int'
../src/ExternalLexer.cpp: In constructor 'LexerLibrary::LexerLibrary(const char*)':
../src/ExternalLexer.cpp:121:3: error: 'GetLexerCountFn' was not declared in
this scope
../src/ExternalLexer.cpp:121:19: error: expected ';' before 'GetLexerCount'
../src/ExternalLexer.cpp:123:7: error: 'GetLexerCount' was not declared in this
scope
../src/ExternalLexer.cpp:128:4: error: 'GetLexerNameFn' was not declared in this
scope
../src/ExternalLexer.cpp:128:19: error: expected ';' before 'GetLexerName'
../src/ExternalLexer.cpp:129:4: error: 'ExtLexerFunction' was not declared in
this scope
../src/ExternalLexer.cpp:129:21: error: expected ';' before 'Lexer'
../src/ExternalLexer.cpp:130:4: error: 'ExtFoldFunction' was not declared in
this scope
../src/ExternalLexer.cpp:130:20: error: expected ';' before 'Folder'
../src/ExternalLexer.cpp:139:33: error: 'GetLexerName' was not declared in this
scope
../src/ExternalLexer.cpp:156:22: error: 'Lexer' was not declared in this scope
../src/ExternalLexer.cpp:156:29: error: 'Folder' was not declared in this scope

  The code complained about in ExternalLexer.h begins with:

// External Lexer function definitions...
typedef void (EXT_LEXER_DECL *ExtLexerFunction)(unsigned int lexer, unsigned int
startPos, int length, int initStyle,
                  char *words[], WindowID window, char *props);
typedef void (EXT_LEXER_DECL *ExtFoldFunction)(unsigned int lexer, unsigned int
startPos, int length, int initStyle,
                  char *words[], WindowID window, char *props);
typedef void* (EXT_LEXER_DECL *GetLexerFunction)(unsigned int Index);
typedef int (EXT_LEXER_DECL *GetLexerCountFn)();
typedef void (EXT_LEXER_DECL *GetLexerNameFn)(unsigned int Index, char *name,
int buflength);

  Is there some new directive required to have it use the 'EXT_LEXER_DECL *'
typedef?

-- 
David C. Rankin, J.D.,P.E.