Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 745 Bytes

compiler-error-c2129.md

File metadata and controls

39 lines (29 loc) · 745 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2129
Compiler Error C2129
11/04/2016
C2129
C2129
21a8223e-1d22-4baa-9ca1-922b7f751dd0

Compiler Error C2129

static function 'function' declared but not defined

A forward reference is made to a static function that is never defined.

A static function must be defined within file scope. If the function is defined in another file, it must be declared extern.

The following sample generates C2129:

// C2129.cpp
static void foo();   // C2129

int main() {
   foo();
}

Possible resolution:

// C2129b.cpp
static void foo();

int main() {
   foo();
}

static void foo() {}