Cannot open source file in Bull Cow Game

I’m currently doing the " Unreal Engine C++ Developer: Learn C++ and Make Video Games" and I’m currently having trouble at part 42. After generating the Visual Studio Code and opening it says that its cannot open source files for:

#include “CoreMinimal.h”
#include “Console/Cartridge.h”
#include “BullCowCartridge.generated.h”

I’ve tried adding “F:\UnrealEngine\UE_4.27\Engine\Source\Runtime\Core\Public” to the c/c++ extension Include Path, changing intellisense mode to clang, Compiled in unreal and refreshed visual studio code.
It compiles successfully in Unreal and not on Visual Code terminal with the error
“fatal error C1083: Cannot open include file: ‘CoreMinimal.h’: No such file or directory”

I’m using Unreal 4.27, open to any suggestions for a fix. Thanks in advance

edit:
I’ve installed this https://github.com/boocs/ue4-intellisense-fixes/releases/ extension and it removes the red lines but the code still wont compile with the same error message in the terminal.

edit:
I’m swapped my editor to Visual Studio 2019 and it works fine, would there be any problems later on or in other courses if I don’t use Visual Studio Code?

That has nothing to do with actually compiling the code. Would need to see the error message of compilation in order to know what’s wrong.


fatal error C1083: Cannot open include file: ‘CoreMinimal.h’: No such file or directory

It’s just the same error

You can’t use cl directly here as it doesn’t know the full build process, what files need to be compiled, what to link to, what paths to add to the include path.

If you want to compile from VS Code you need to do the following, provided you have the workspace open.

Ctrl + Shift + B > ProjectNameEditor Platform Development Build.

Where ProjectName is the name of your project and Platform is the platform you’re targeting e.g. Win64

1 Like

I see, Thank you very much! :slight_smile:

Would you also happen to know if I can complete the courses using visual studio 2019 instead of code or does code have something necessary to the lessons?

Only that multi-cursor is used which is much better in Code. Using any directional keys in Community brings you out of multi-cursor mode.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms