Re: Compiling OpenShadingLanguage under Windows


wormszer <worm...@...>
 

I too have been trying to build under windows and ran across the same
problem with the t variable.
Assuming gcc allows it for some reason, by default is_closure() is
false so that is what i set it too.

I am having trouble with some includes particulary
#include <unistd.h>

I have one error in oslquery a missing R_OK which is defined i believe
through this file.
I can dig it up and add it but I think i will run into more problems
later on in the other projects.

I am also getting a hash_map error when building oslcomp.

What version of flex and bison are you using? I had found a gnuwin32
builds of both but flex was pretty out of date.
I have installed cygwin to use the latest versions from there to run
flex and bison. Which generates files that have better includes
<iostream> vs <iostream.h> etc.

Hopefully we can get this figured out.
I am using visual studio 2008 as well. I just realized i might not
have sp1. I will update and see if that helps at all.

Thanks
Jeremy

On Jan 17, 8:23 am, Oleg <od...@...> wrote:
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.