# Circular Dependency Detected

### Error <a href="#error" id="error"></a>

```
Cicular Dependency Detected
```

### Cause <a href="#cause" id="cause"></a>

In some cases, it might be because a class is defined/forward declared without it being defined.

```cpp
virtual TArray<class USH_RV2_SplineComponent*> GetSplineSectionPaths();
```

In this case, `USH_RV2_SplineComponent` was not defined anywhere, and the class that this array was in had an Interface that thought this was a circular dependency.

### Fix <a href="#fix" id="fix"></a>

Make sure the correct #includes are added so that there is no “circular dependency”.

```cpp
#include "Components/SH_RV2_SplineComponent.h"
```

### Notes <a href="#notes" id="notes"></a>

* When I deleted the Binaries/Intermediate folders and regenerated fresh, this error becamse an “undefined class” error. The notes here are to remind me to check other errors because the initial error may not be what’s actually causing this error.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oserosuite.com/technical-notes/unreal-engine-notes/compile-errors/circular-dependency-detected.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
