简体   繁体   中英

Unreal Engine and Clion (can't resolve some sybmols)

UE 4.23

CLion 2019.2.1 (clangd server off)

After testing this newbie tutorial i have many unresolved symbols in clion like on picture:

在此处输入图片说明

Only when I add this-> to variable or method - the red letters are disappear. How avoid this?

In your FloatingActor.cpp file, add the following includes after #include "FloatingActor.h" :

#include "Components/StaticMeshComponent.h"
#include "ConstructorHelpers.h"

will solve the problem.

Please note that you should only put these includes inside the .cpp file, not the .h file.

Here are my includes in .cpp file and .h file.

  • FloatingActor.h
#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "FloatingActor.generated.h"
  • FloatingActor.cpp
#include "FloatingActor.h"
#include "Components/StaticMeshComponent.h"
#include "ConstructorHelpers.h"

More discussions here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM