Sidenode: I'm not asking anyone to help me with a directx tutorial. I think this error is a normal Visual Studio win32 API error.
Hey guys and girls, I'm trying to learn some DirectX 11 for fun and I found those directx11 examples on github. Now I'm trying to understand each function and see how everything works together. I created a new VS project just to play around with stuff. I copy-pasted all of the code in Tutorial02.cpp into my own project, created a new filter called "Shaders" and changed the properties of my VS solution. At that point I don't have any problems to compile my code. Once I add the Tutorial02.fx, Tutorial02_VS.hlsl and Tutorial02_PS.hlsl to the solution VS can't compile and gives me the following error code:
X3501 'main': entrypoint not found Project00 C:\Users\Meow\Desktop\directx-tests\Project00\Project00\Project00\FXC 1
Github link (directx11 tutorial main file): https://github.com/walbourn/directx-sdk-samples/blob/master/Direct3D11Tutorials/Tutorial02/Tutorial02.cpp
What I did:
d3d11.lib
d3dcompiler.lib
dxguid.lib
winmm.lib
comctl32.lib
But when I add the Tutorial02.fx, Tutorial02_VS.hlsl and Tutorial02_PS.hlsl to my Shader filter or any other filter and recompile visual studio tells me: 'main': entrypoint not found -- Once I remove (not delete) the files again it works just fine.
Does anyone know why?
(In the tutorial solution they add these files to the solution aswell and it works just fine)
With the help of github demo, I can reproduce this problem. You can refer to the screenshots below to modify:
Tutorial02.fx properties:
Tutorial02_PS.hlsl properties:
Tutorial02_VS.hlsl properties:
You can also refer HLSL Property Pages to learn how individual HLSL shader files are built.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.