> For the complete documentation index, see [llms.txt](https://docs.oserosuite.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oserosuite.com/technical-notes/unreal-engine-notes/compile-errors/static-function-in-namespace-not-defined.md).

# Static Function in Namespace Not Defined

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

```
static function 'FString OS_MDC_Keys::ReplaceAll()' declared but not defined
```

```cpp
namespace OS_MDC_Keys
{
  static FString ReplaceAll();
}
```

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

A function declared as static in a namespace needs to be defined in the header.

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

Either move the function definition to the header OR remove the static specifier. Global functions in namespaces do not need to be static.

```cpp
namespace OS_MDC_Keys
{
  static FString ReplaceAll() {}
}
```

```cpp
namespace OS_MDC_Keys
{
  FString ReplaceAll();
}
```
