How to use unreal engine modules in C++ (Linker Error)

I am trying to use unreal’s built-in “AndroidAdvertising” module in c++.
Below is the AndroidAdvertising module’s location in 4.27
LocationOfModuleAndroidAdvertising2

Firstly, I added “AndroidAdvertising” to the build.cs

.uproject
uprojectfile

target.cs
TargetcsOfProject750

After this I tried to build the solution(without adding any extra code) which gave a linking error:

LINK : fatal error LNK1181: cannot open input file ‘E:\Unreal Engine\UE_4.27\Engine\Intermediate\Build\Win64\UE4Editor\Development\AndroidAdvertising\UE4Editor-AndroidAdvertising.lib’

Full Log File: Build.txt (1.5 KB)

Project Structure:
ProjectStructure2

I have a custom “Android” module in which I am trying to access unreal’s “AndroidAdvertising” module.

complete project(Project750.rar - Google Drive)

Any help or suggestion will be appreciated.

Could it be that the Type is Editor when it is a Runtime module?

Set the module type to Runtime :
AndroidAdvertisingSettoRuntimeinP750uproject

then → “Generate Visual Studio project files” → “Build

Still Got the same Error: LINK : fatal error LNK1181: cannot open input file ...\AndroidAdvertising\UE4Editor-AndroidAdvertising.lib'

Build Log: Build2.txt (2.0 KB)

This topic has been moved from International to Programming & Scripting: C++.

When posting, please review the categories to ensure your topic is posted in the most relevant space. Hopefully, this category change will help you to get an answer.

In the meantime, good luck and happy developing. :slight_smile:

1 Like

HELP plzz, did you fix it???