Yes, the flags used for creating the device include D3D11_CREATE_DEVICE_DEBUG. Also, I did call cgD3D11SetDevice with a valid device polnter before I loaded the shader, so I have no idea what's going on.
What is the HRESULT returned by cgD3D11LoadProgram()?
According to the debugger, the value is 0x8876086c, but again, cgGetLastErrorString returns CG_NO_ERROR after cgD3D11LoadProgram. To me, that HRESULT is pretty meaningless, but I don't think cgD3D11LoadProgram() is the issue because according to the debugger the memory address of vs (CGprogram is a pointer type) after returned from cgCreateProgramFromFile is 0x0000000e, which I suspect would not be a valid pointer location.
Edit: sorry for the multiple edits; for some reason my full response wouldn't show up.
is it possible that you are confusing the entry point? Just had a look at the wikipedia article, and it looks like CG requires an entry point named main
I tried changing the entry point to main, and I still got the same errors. I was doubtful about such a fix anyway, because if CG required an entry point named 'main' it would be pointless to specify an entry point when loading the shader.