Re: Compiling OpenShadingLanguage under Windows


Oleg <ode...@...>
 

Hi Jeremy,

I'm using the following versions of flex/bison:

- flex, GnuWin32 distribution, version 2.5.4
- bison, GnuWin32 distribution, version 2.4.1

and having the same problems. I have simply commented out <unistd.h>
includes and compiled the corresponding files again. The another
problem is that this flex version cannot use slashes as path separator
for generated files, so I have replaced slashes by backslashes for
every flex file.

The "access" function is defined in "io.h" header file under Windows,
so I have changed the "oslquery.cpp" file as follows:

#ifdef __unix__
#include <unistd.h>
#define EXIST F_OK
#define EXEC X_OK
#define WRITE W_OK
#define READ R_OK
#else
#include <io.h>
#define EXIST 00
#define EXEC 01
#define WRITE 02
#define READ 04
#endif

The "hash_map" class is defined in "stdext" namespace under Windows/VS
2008. I think you can use it without SP1, but I'm not sure.

Regards,
Oleg

On 17 Jan., 22:52, wormszer <wo...@...> wrote:
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

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