The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 01-31-2008
Nathalie1 Nathalie1 is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 2
Problem with including foreign characters in Lex rule

Hi,

I'm hoping that someone might be able to help me with this problem:

I have already added new code to several existing Lex rules to accept the following foreign characters: å ä ö Å Ä Ö æ Æ ø Ø ü Ü ß. The code looks like this:

/*Nathalie Stern, 080121 - Add å ä ö Å Ä Ö æ Æ ø Ø ü Ü ß handling to function*/
<INITIAL>[A-Za-z]+[A-Za-z0-9_\-\xe5\xe4\xf6\xc5\xc4\xd6\xe6\xc6\xf8\xd8\xfc\xdc\xdf]* {
strcpy(ident1, yytext);
strcpy(latestIdent, yytext);
BEGIN SECID1;
}

Everything compiles and runs fine until I try to include the same character handling in the first part of a rule which checks the first letter of a word being sent in (i.e. in the [A-Za-z]+ part) For some reason, my compiler (Microsoft Visual C++ 6.0) doesn't like it and throws the following error:

Compiling...
lex.tracks.c
Linking...
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
tracks1.obj : error LNK2001: unresolved external symbol _tracksMain
.\Debug\simtrac_pre_.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

simtrac_pre_.exe - 2 error(s), 1 warning(s)

Does anyone have any idea why this happens? I have tried running the clean commando and rebuild and relink all files but I still get the exact same error.
Any thoughts on this would be much appreciated.

Thanks,
Nathalie