# Compilation error, the source code in the plugin calls the main project file and reports an error。

**URL:** <https://forums.unrealengine.com/t/compilation-error-the-source-code-in-the-plugin-calls-the-main-project-file-and-reports-an-error/488292>\
**Category:** C++\
**Tags:** error-compile, unreal-engine, question, CPP\
**Created:** [September 2, 2021, 5:35am UTC](https://forums.unrealengine.com/t/compilation-error-the-source-code-in-the-plugin-calls-the-main-project-file-and-reports-an-error/488292 "2021-09-02T05:35:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LittleTimeWxk](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/littletimewxk/32/88714_2.png) [@LittleTimeWxk](https://forums.unrealengine.com/u/LittleTimeWxk)\
**Post date:** [September 2, 2021, 5:35am UTC](https://forums.unrealengine.com/t/compilation-error-the-source-code-in-the-plugin-calls-the-main-project-file-and-reports-an-error/488292/1 "2021-09-02T05:35:31Z")

</div>

Working environment：  
Windows、Visual Studio 2019

Premise description：  
I created a UE4 C++ project and downloaded the AirSim plugin from github and added it to my own C++ project. I solved the problem of calling the plug-in source code from the main project, but when I modify the source code in the plug-in, I need to import the custom C++ class file in the main project and keep getting an error.  
ERROR MESSAGE " fatal error C1083: cannot open include file: “xxxx.generated.h”: No such file or directory."

```
I have tried many methods on the Internet, such as adding an include directory in the project properties, but it still has no effect. I still think there is a problem with the way the main project file is referenced in the plug-in, but I don't know how to deal with this problem.

```

Remark:  
My directory structure conforms to the specification, and the plug-in is placed in the Plugins folder！

---

<div class="post-metadata">

**Author:** ![LittleTimeWxk](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/littletimewxk/32/88714_2.png) [@LittleTimeWxk](https://forums.unrealengine.com/u/LittleTimeWxk)\
**Post date:** [November 16, 2021, 1:17am UTC](https://forums.unrealengine.com/t/compilation-error-the-source-code-in-the-plugin-calls-the-main-project-file-and-reports-an-error/488292/2 "2021-11-16T01:17:14Z")

</div>

I have solved it. I did not use airsim as a plug-in， and I added the source code of AirSim to my project.  
The reason why is that wrong citation. AirSim as a plugin that has portability and other features. Otherwise，You can try to modify the C++ plug-in into a module and add it to the project to solve this kind of problem (I didn’t try to do this).
