Compiling DirectX11 Shader Files
<p>I am currently following the DirectX 11 tutorial from <a href="http://www.rastertek.com" rel="nofollow">www.rastertek.com</a> in the 2nd series of tutorials. I'm currently using VS2015 on a Windows7 x64. Following this tutorial has me using the Windows 10 kit. </p>

<p>I've successfully completed the first 3 tutorials and was able to render a colored window using DirectX 11. I've just completed tutorial 4 to render a colored triangle using the HLSL with a vertex &amp; pixel shaders. I'm following this tutorial where both the vertex and pixel shaders are in separate files the only difference in my code is the file extension that I'm using. His website uses *.vs and *.ps respectively where I'm using *.vsh and *.psh since this gives me code highlighting. All of my class files compile correctly but when I begin to build out my solution I am getting this error.</p>

<pre><code>1&gt;------ Build started: Project: DirectX 11 Engine, Configuration: Debug x64 ------
1&gt;FXC : error X3501: 'main': entrypoint not found
1&gt;
1&gt;  compilation failed; no code produced
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
</code></pre>

<p>The creator of this website does not have any contact information or community based forums. I do not know if this is an error within the website's tutorial or not. Now I know that this code has worked before using older versions of VS such as 2010, 2012 and 2013 on both Windows Vista and Windows 7 using both Windows 7 &amp; Windows 8 kits from his first series of DirectX 10 &amp; DirectX 11 tutorials. I wasn't able to find any help from <a href="http://www.msdn.com" rel="nofollow">www.msdn.com</a> since some of their tutorials are written with the requirement of Windows 8 for DirectX 11 using VS2013. Their documentation is quite poor too.</p>

<p>One of the things that I have noticed that is different within DirectX 11 from the Windows Kit versus the deprecated June 2010 Direct X SDK release when Compiling a Shader file is as follows:</p>

<p><strong>June 2010 Direct X SDK</strong> - Uses:</p>

<pre><code>HRESULT result;

result = D3DX11CompileFromFile( "shaderFilename", NULL, NULL, "ShaderName", "*s_5_0" or "*s_5_1", D3D10_SHADER_ENABLE_STRICTNESS, 0, NULL, &amp;pShaderBuffer, &amp;pErrorMessage, NULL );
</code></pre>

<p>Versus...</p>

<p><strong>This tutorial (Windows 10 kit from VS2015)</strong> - Uses:</p>

<pre><code>HRESULT result;
result = D3DCompileFromFile( "shaderFilename", NULL, NULL, "ShaderName", "*s_5_0" or "*s_5_1", D3D10_SHADER_ENABLE_STRICTNESS, 0, &amp;pShaderBuffer, &amp;pErrorMessage );
</code></pre>

<p>Where the shader filename, shader name, feature level, and the shader buffer is either a Vertex or Pixel Shader Type. And the feature level being used in both these cases is "5_0" and not "5_1" even though I have specified both feature levels. </p>

<p>I'm not sure what has changed between the different compilers for DirectX's HLSL, and I don't understand where or why this error is being generated from. I do not know if the Shader Source code from the website's tutorial is missing something, or if there is some kind of property or setting in VS2015 not set right that I'm unaware of. I am open for any and all suggestions to help resolve this issue.</p>