Mail Archives: djgpp/1996/11/28/21:22:17
timolmst AT cyberramp DOT net wrote:
>
> I am portint a large unix app to dos. I have everything compiling now,
> but when I try to link, I get many errors of multiply defined labels.
> What the labels have to do with is lexical analysers generated by
> FLEX. THere are multiple scanners in the program. FLEX generates the
> same labels for each run, and thus, the errors. Each one of these
> scanners is contained in a library.
>
> How do I tell GCC/LD that these labels should be considered local,
> instead of global?
>
> I think this MAY be my last hurdle to getting this program to run. Any
> help would be greatly appreciated.
Is it just yylex that's causing the problems? FLEX allows you to change
the name of yylex via a macro you can define in the top section of your
scanner file (YY_DECL).
eg
...
%{
#define YY_DECL int yylex_for_scanner_number_one(void)
%}
...
%%
,,,
%%
...
If not, can you make the offending functions static?
Bill
--
Leave others their otherness.
- Raw text -