Compiling OpenShadingLanguage under Windows


Oleg <ode...@...>
 

Hi All,

I'm trying to compile the OpenShadingLanguage library under Windows
using VisualStudio 2008. I was able to compile the following projects
so
far:
- oslquery
- oslinfo

There is a problem compiling the "oslgram.cpp" file generated by
bison.
The compiler complains that "TypeSpec" type used in "oslgram.y", line
274, is unknown:

Error 22 error C2065: 't' : undeclared identifier D:\Src
\OpenShadingLanguage\src\liboslcomp\oslgram.y 274

Error 23 error C2228: left of '.is_closure' must have class/
struct/union D:\Src\OpenShadingLanguage\src\liboslcomp\oslgram.y
274


Here is the corresponding code in "oslgram.y":

| simple_typename IDENTIFIER arrayspec initializer_list
{
TypeDesc simple = lextype ($1);
simple.arraylen = $3;
TypeSpec t (simple, t.is_closure
()); // <--- LINE 274
ASTvariable_declaration *var;
var = new ASTvariable_declaration (oslcompiler,
t,
ustring ($2), $4, false,
true /* ismeata */, false /
*output */,
true /* initializer list */);
$$ = var;
}
;

I'm not familiar with bison... Any help is welcome :-)

Regards,
Oleg


P.S.: It's great that Sony Pictures ImageWorks shares this technology!

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