# Error when compiling the project

**URL:** <https://forums.unrealengine.com/t/error-when-compiling-the-project/1834623>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, CPP, question\
**Created:** [May 1, 2024, 12:23pm UTC](https://forums.unrealengine.com/t/error-when-compiling-the-project/1834623 "2024-05-01T12:23:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![IrSoil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IrSoil](https://forums.unrealengine.com/u/IrSoil)\
**Post date:** [May 1, 2024, 2:14pm UTC](https://forums.unrealengine.com/t/error-when-compiling-the-project/1834623/2 "2024-05-01T14:14:11Z")

</div>

В первую очередь, по поводу решаемой задачи, простейшее решение: посмотреть гайды по коннекту к бд которая вам нужна. С большой вероятностью уже существует плагин\пример решающий данную задачу.

Касательно ошибки о которой идет речь, согласно посту [Updated to 4.20 now i can't build, error C4668](https://forums.unrealengine.com/t/updated-to-4-20-now-i-cant-build-error-c4668/430566) есть 2 возможных решения: до инклуда `windows.h`(который вероятно происходит внутри `ConnectDB.h` или `DBManager.h`) - либо объявить `#define WIN32_LEAN_AND_MEAN`, либо `#include "Windows/WindowsWindow.h"`

---

_[View the full topic](https://forums.unrealengine.com/t/error-when-compiling-the-project/1834623)._
