Problem with Include UChaosWheeledVehicleMovementComponent

Hi all,
I have a custom pawn class from which I want to derive a class that uses the UChaosWheeledVehicleMovementComponent.
This is the code I use for this class:
This is the .h

In the .cpp I have Implemented the constructor and deconstructor but they do not contain any code yet.
I want to make use of the UChaosWheeledVehicleMovementComponent but including it results in errors.

What I have tried

  1. Relative include to ChaosWheeledVehicleMovementComponent.h

    This results in an error upon compilation:
  2. #include ChaosWheeledVehicleMovementComponent.h"
    This results in error:
  3. a forward delclaration:
    class CHAOSVEHICLES_API UChaosWheeledVehicleMovementComponent;
    This yields an error: Type 'CHAOSVEHICLES_API' is incomplete
  4. different forward declaration: class UChaosWheeledVehicleMovementComponent;
    like this

    Which also results in errors:

If someone knows how to resolve this, please let me know!!

I resolved this issue by adding the “ChaosVehicles” dependency to PublicDependencyModuleNames in

1 Like