Re: Compiling OpenShadingLanguage under Windows

"Pierre Saunier" <pierre...@...>

Dear all,

Isn't it possible to distribute the files produced by Flex and bison?
Normally, they should be independant from the system (they are produced on and they are
used on), and it will avoid a lot of trouble to build osl...
And if someone wants to recreate them, it is always possible!

When the doc about integrating OSL in an actual renderer will be available? At least some
sample code?




Did you encounter the same linking issues i mentioned?

Let me know how it works out for you.

I had tried compiling the shaders after making some changes to the project
file for a path issues, but I didnt get any warnings or outputs from inside
If I tried to run it from the command line, after finding all the
dependencies, it gave me a could not find file error. It didn't seem to be a
dll error but something else.

I plan to look into it more now.


On Tue, Jan 19, 2010 at 8:14 PM, Oleg <ode...@...> wrote:

Hi Jeremy,

Using boost math functions, some definitions in fmath.h and the
following two implementations of my own

inline float
logbf(float val) {
// please see
return logf(val)/logf(FLT_RADIX);

inline float
exp2f(float val) {
// 2^val = e^(val*ln(2))
return exp( val*log(2.0f) );

I was able to compile it under Windows. It's not the best solution,
but probably better as nothing...

It's time to test it :-)


On 19 Jan., 19:08, Wormszer <wo...@...> wrote:
Thanks Larry,

I was wondering where the best place would be to add the missing
Currently I have used the boost C99 math libraries and the missing two
functions logbf and exp2f i defined to 0.0f temporarily so I could see
other issues I would run into when building.
I will come back and try and work the missing math functions into

But I have run into a couple of other issues with the oslexec project and
the TypeSpec class.

It seems that some of its functions are implemented in Symtab.cpp instead
TypeSpec.cpp specifically, c_str() and string(). I am not sure if this
on purpose or not.
On the oslexec project on windows this was causing linking issues. This
project doesn't include symtab.cpp and they were not being exported from
oslcomp library. Including Symtab.cpp raises other errors.
So I moved these declarations into the TypeSpec.cpp file fixing the

There is a similiar issue with Symbol::mangled () it was implemented in
Symtab.cpp as well. I also moved this to TypeSpec.cpp to fix the errors
I am not sure if that is best place since its not as obvious as the

I can now build oslexec and it did not seem to effect oslcomp.

You received this message because you are subscribed to the Google Groups
"OSL Developers" group.
To post to this group, send email to osl...@....
To unsubscribe from this group, send email to
For more options, visit this group at

Mail sent using root eSolutions Webmailer -

Join to automatically receive all group messages.