Error C2065: 'bAttributeLessDraw': undeclared identifier:build failed with 4.11.0 release source

I download latest release source zip(UE4.11) from github, then I run setup.bat, then I run GenerateProjectFiles.bat. then I build with VS2015(DebugGame Editor, win64), but can’t compile successfully, therer are two error :

error C2065: ‘bAttributeLessDraw’:
undeclared identifier
fatal error C1020: unexpected #endif

Hey DawnArc-

After running GenerateProjectFiles.bat, you first need to build the engine using Development Editor. Once this build is complete you can then build using other configuration solutions.


I am get the same error but using VS2013 even when building using the development editor configuration

alt text

I found the reason, maybe someone push error code to the latest release. just remove these code which compile failed with:

//  @Todo Workaround for radr://15076670 "Incorrect gl_VertexID in GLSL for glDrawElementsInstanced without vertex streams on Nvidia”
		ContextState.VertexAttrs[0].bEnabled = false;
		ContextState.VertexStreams[0].VertexBuffer = nullptr;

Check my post here: error C2065: 'bAttributeLessDraw': undeclared identifier:build failed with 4.11.0 release source - C++ - Unreal Engine Forums

Don’t you feel the same that deleting a PLATFORM_MAC guarded code piece when compiling against windows makes no sense?

Hey DawnArc-

I’m glad you were able to get the engine to compile for you. To help me understand why this bit of code was preventing the compile, can you post your DXDiag. Also, are you using Windows or Mac (or running both in separate partitions)?

Check the link inside my post, I’ve given the reason. It’s basically about source file encoding.

yes, you are right!

Hey DawnArc & Trout Zhang-

Local testing has not led to this occurring for me. I did notice the special character shown in screenshot on the forum thread as well as the fact that you both have “China” set as your location on the forum. Can you confirm that you are in China or if your machine is set to the Chinese region? It may be that this is a localization issue which is why it is not happening for me.

hey ,
yes we are in China, and I set non-Unicode to “Chinese”, if this issue didn’t happening on you machine, you can set like this in Control Panel -》Region -》 Administrative -》Language for non-Unicode programs:

Thank you DawnArc, I was able to confirm that this appears to be related to having the Chinese locale set for the machine and have entered a bug for investigation (UE-29708). For now, making the changes that Trout Zhang mentioned or commenting out the #if WITH_MAC section should be the best solution to workaround the build failure.