# Why does my Visual Studio project constantly say it can't find stdint.h but it builds fine?

**URL:** <https://forums.unrealengine.com/t/why-does-my-visual-studio-project-constantly-say-it-cant-find-stdint-h-but-it-builds-fine/341537>\
**Category:** Pipeline & Plugins\
**Tags:** unreal-engine, bug-report, Visual-Studio, CPP, question\
**Created:** [December 15, 2015, 5:47pm UTC](https://forums.unrealengine.com/t/why-does-my-visual-studio-project-constantly-say-it-cant-find-stdint-h-but-it-builds-fine/341537 "2015-12-15T17:47:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![janimationd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@janimationd](https://forums.unrealengine.com/u/janimationd)\
**Post date:** [December 15, 2015, 5:47pm UTC](https://forums.unrealengine.com/t/why-does-my-visual-studio-project-constantly-say-it-cant-find-stdint-h-but-it-builds-fine/341537/1 "2015-12-15T17:47:33Z")

</div>

Everywhere I try to include stdint.h and use it’s associated types like int32\_t or uint8\_t, Visual Studio reports "Error: Cannot open source file “stdint.h” ".

When I specify these types as “std::int32\_t” the usages are underlined as errors, but I can use VS’s “peek definition” feature to see the file where they are defined.

As long as I only build, and don’t rebuild, everything appears to build fine. Why is Visual Studio so confused here? Here’s a screenshot of what I’m seeing, with the usage underlined, but “peek definition” still working:

 ![70737-dumb.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/7/817b4faede210c36b00528ec3d9061c74e9d82d4.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:** [December 15, 2015, 9:09pm UTC](https://forums.unrealengine.com/t/why-does-my-visual-studio-project-constantly-say-it-cant-find-stdint-h-but-it-builds-fine/341537/2 "2015-12-15T21:09:20Z")

</div>

Hey janimatriond-

I was able to add an include for stdint.h as well as declare an int32\_t, both of which compiled without issue. Can you post the full compile error that you receive? Looking at the screenshot I can’t tell if what is highlighted is intellisense giving a false positive or if it is an actual error. Also, can you try adding the stdint.h include in a new project with no additional content and see if you have the same compile errors.

Cheers

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ecb5cc49](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ecb5cc49](https://forums.unrealengine.com/u/anonymous_user_ecb5cc49)\
**Post date:** [December 16, 2015, 1:03am UTC](https://forums.unrealengine.com/t/why-does-my-visual-studio-project-constantly-say-it-cant-find-stdint-h-but-it-builds-fine/341537/3 "2015-12-16T01:03:17Z")

</div>

Could be an intellisense error… Maybe?

Edit: What I mean by that is intellisense kinda sucks for UE4/C++ in my experience so I just turn it off but I see a lot of weird stuff like that. I normally just use Resharper carefully configured.

---

<div class="post-metadata">

**Author:** ![janimationd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@janimationd](https://forums.unrealengine.com/u/janimationd)\
**Post date:** [December 17, 2015, 7:05pm UTC](https://forums.unrealengine.com/t/why-does-my-visual-studio-project-constantly-say-it-cant-find-stdint-h-but-it-builds-fine/341537/4 "2015-12-17T19:05:00Z")

</div>

They are build errors, not intellisense errors. Intellisense can actually find the header file, which is why it can Peek Definition. I created a new project and I don’t have the same issue. These errors only pop up occasionally and can often be fixed by rebuilding rather than building, or vice versa. The errors are pretty non-deterministic.
