Date: Fri, 29 Nov 1996 15:17:39 +0000 From: Bill Currie Subject: Re: Compiler switch? To: timolmst AT cyberramp DOT net Cc: djgpp AT delorie DOT com Reply-to: billc AT blackmagic DOT tait DOT co DOT nz Message-id: <329EFE93.3A98@blackmagic.tait.co.nz> Organization: Tait Electronics NZ MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: <57k8q7$p1d AT newshost DOT cyberramp DOT net> 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.