error: could not find include file: stdosl.h

Hi all,
I wanted to start with some OSL programming and I am trying to compile this empty OSL shader:

#include "stdosl.h"

shader test_shader()
{
}

and I get this error: could not find include file: stdosl.h
I use Blender v2.72 and I checked Open Shading Language in render settings and my Compute Device is CPU. Do I need to do anything else?

Hello!

Actually you don’t need the #include “stdosl.h” or the #include <stdosl.h> , it will work if you just begin your code with “shader test_shader()”!

Works, thanks :slight_smile: