Undef C++ link symbol
I have been working on getting flex++ 2.4.7 and bison++ 1.21-8 ported over to
the Amiga. Both seem to be working ok with SAS/C 6.51, with full optimization.
I am having a problem with the generated C++ lexer I am building with Flex++.
At link time, I am getting the following undefined symbol:
@__write__7ostreamFPCci
(Both of those long underscores are actually 2 underscores _). It asks me to
define a stub, so I hit enter and let the slink step finish.
According to the SAS/C user's guide, the @ means registerized, and a single
underscore is always added to external symbols by the linker (p.134).
I then use CPR to run it and I can get to the actual call in my source code
that didn't get resolved by slink:
void yyFlexLexer::LexerOutput( const char* buf, int size )
{
(void) yyout->write( buf, size );
}
yyout is defined this way:
ostream* yyout; // output sink for default LexerOutput
The usual iostream.h is included way above all this.
I searched thru the names in LIB:sc.lib, and found these external names:
@write__7ostreamFPCci
(Again with 2 underscores).
When you demangle this name you get:
ostream::@write(const char*,int)
just like you would expect.
The compiles go fine, no errors, 3 minor warnings about assigning an unsigned
int to a signed, but no other messages. WHAT'S happening?
#include <disclaimer.h>