Re: Compiling OpenShadingLanguage under Windows

Oleg <ode...@...>

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 what
other issues I would run into when building.
I will come back and try and work the missing math functions into fmath.h.

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 of
TypeSpec.cpp specifically, c_str() and string(). I am not sure if this was
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 the
oslcomp library. Including Symtab.cpp raises other errors.
So I moved these declarations into the TypeSpec.cpp file fixing the linking

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 But
I am not sure if that is best place since its not as obvious as the TypeSpec

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


Join { to automatically receive all group messages.