Code Blocks: Undefined reference to myFct
问题 main.c #include <stdio.h> #include <stdlib.h> #include "functions.h" int main() { myFct(); return 0; } functions.h #ifndef FUNCTIONS_H_INCLUDED #define FUNCTIONS_H_INCLUDED #include <stdio.h> extern void myFct(void); #endif // FUNCTIONS_H_INCLUDED functions.c #include "functions.h" void myFct(void) { printf ("helloFCT"); } While compiling this project i have this error "undefined reference to myFct" I'am using Code::Blocks13.12 and windows 8 Thanks in advance 回答1: You need to compile both the