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

**URL:** <https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617>\
**Category:** C++\
**Tags:** unreal-engine, compile-error, bug-report, question, CPP\
**Created:** [April 2, 2016, 1:55pm UTC](https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617 "2016-04-02T13:55:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dawnarc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dawnarc](https://forums.unrealengine.com/u/dawnarc)\
**Post date:** [April 2, 2016, 1:55pm UTC](https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617/1 "2016-04-02T13:55:33Z")

</div>

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 :

> F:\EpicGames\UnrealEngine-4.11.0-release\Engine\Source\Runtime\OpenGLDrv\Private\OpenGLCommands.cpp(2794):  
> error C2065: ‘bAttributeLessDraw’:  
> undeclared identifier  
> F:\EpicGames\UnrealEngine-4.11.0-release\Engine\Source\Runtime\OpenGLDrv\Private\OpenGLCommands.cpp(2800):  
> fatal error C1020: unexpected #endif

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [April 2, 2016, 4:31pm UTC](https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617/2 "2016-04-02T16:31:22Z")

</div>

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.

Cheers

---

<div class="post-metadata">

**Author:** ![mkibria](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mkibria](https://forums.unrealengine.com/u/mkibria)\
**Post date:** [April 2, 2016, 8:14pm UTC](https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617/3 "2016-04-02T20:14:53Z")

</div>

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

alt text

---

<div class="post-metadata">

**Author:** ![dawnarc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dawnarc](https://forums.unrealengine.com/u/dawnarc)\
**Post date:** [April 3, 2016, 1:05am UTC](https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617/4 "2016-04-03T01:05:10Z")

</div>

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”
#if PLATFORM_MAC
	if(bAttributeLessDraw)
	{
		glDisableVertexAttribArray(0);
		ContextState.VertexAttrs[0].bEnabled = false;
		ContextState.VertexStreams[0].VertexBuffer = nullptr;
	}
#endif
```

---

<div class="post-metadata">

**Author:** ![Trout\_Zhang](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trout\_Zhang](https://forums.unrealengine.com/u/Trout_Zhang)\
**Post date:** [April 5, 2016, 6:19am UTC](https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617/5 "2016-04-05T06:19:38Z")

</div>

Check my post here: [error C2065: 'bAttributeLessDraw': undeclared identifier:build failed with 4.11.0 release source - C++ - Unreal Engine Forums](https://forums.unrealengine.com/showthread.php?106156-error-C2065-bAttributeLessDraw-undeclared-identifier-build-failed-with-4-11-0-release-source)

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [April 5, 2016, 4:35pm UTC](https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617/6 "2016-04-05T16:35:24Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![Trout\_Zhang](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trout\_Zhang](https://forums.unrealengine.com/u/Trout_Zhang)\
**Post date:** [April 6, 2016, 2:06am UTC](https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617/7 "2016-04-06T02:06:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dawnarc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dawnarc](https://forums.unrealengine.com/u/dawnarc)\
**Post date:** [April 7, 2016, 7:16am UTC](https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617/8 "2016-04-07T07:16:28Z")

</div>

yes, you are right！

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [April 8, 2016, 6:32pm UTC](https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617/9 "2016-04-08T18:32:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dawnarc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dawnarc](https://forums.unrealengine.com/u/dawnarc)\
**Post date:** [April 16, 2016, 2:58am UTC](https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617/10 "2016-04-16T02:58:14Z")

</div>

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:

 ![87078-error+c2065+'battributelessdraw'+undeclared+identifier+build+failed+with+4.11.0+release+source.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/c/a8c479725207df6f34c84bfd3cc0c3f24da2e654.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [April 20, 2016, 4:20pm UTC](https://forums.unrealengine.com/t/error-c2065-battributelessdraw-undeclared-identifier-build-failed-with-4-11-0-release-source/352617/11 "2016-04-20T16:20:36Z")

</div>

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.
