Re: Compiling OpenShadingLanguage under Windows


Oleg <ode...@...>
 

Hi Chris,

Thank you very much for your reply. It works!

Here comes the next problem compiling the "osllex.cpp" file generated
by flex from "osllex.l" :-(

D:/Src/OpenShadingLanguage/src/liboslcomp/osllex.l(118) : error C2065:
'osllloc' : undeclared identifier



Here is the corresponding cpp code:

#define yylloc osllloc

void preprocess (const char *yytext);

// Macro that sets the yylloc line variables to the current parse
line.
#define SETLINE yylloc.first_line = yylloc.last_line = oslcompiler-
lineno()


And here is the lex code:

#define yylloc osllloc

void preprocess (const char *yytext);

// Macro that sets the yylloc line variables to the current parse
line.
#define SETLINE yylloc.first_line = yylloc.last_line = oslcompiler-
lineno()
%}


%%

/************************************************
* Lexical matching rules
************************************************/

/* preprocessor symbols */
{CPP} { preprocess (YYText()); SETLINE; } //
<--- LINE 118

Join {osl-dev@lists.aswf.io to automatically receive all group messages.