Re: Compiling OpenShadingLanguage under Windows
Wormszer <worm...@...>
Hello Oleg,
toggle quoted messageShow quoted text
That's probably a better solution. Will need to go back and make sure the libraries export their classes rather than duplicating the source in the projects. I was trying to avoid adding to much to the code for windows, and I was planning on after hopefully to get it all building, to then do a clean checkout and do it again and make changes to submit as a patch. I played around some and finally got a shader to compile. I have a solution but its not very elegant. The compiler is hard coded to use linux CPP preprocessor. /usr/bin/CPP I was able to get it working using CL to do the pre-processing. But I had to write it to a file and read it back in rather than using stdout. Its only a few lines of code extra and passes the file handle from the opened file to the parser instead of the _popen handle. CL will output to stdout. When i was testing in in the debugger the issue was that by default the build environment is not setup. You typically have to run the vcvars32.bat to set it up and that was causing some issues. And then i am not positive if the stdout of CL parses correctly, it seems to insert the filename at the begining, but the file output does. So maybe we can figure out a better solution to get it working with cl using stdout. It may work if you run oslc from a command prompt with the vs variables setup already. I will try that next, except im expecting the process spawned by _popen won't have the environment setup correctly. And since it using stdout to read from then anything you do can't output or it gets parsed. If you mess with it the parameters to CL i used are /P /C /EP /X /nologo and then /FI to force the include file. Remove /P if you want stdout instead of file. Jeremy
On Wed, Jan 20, 2010 at 4:07 PM, Oleg <ode...@...> wrote: Hi Jeremy,
|
|