Code::Blocks - how to compile multiple source files
问题 I'm trying to compile a program with multiple source files - two CPP files and a header file, with code::blocks. As an example, I have created the following three files (an example program created by someone else on another forum): main.cpp: #include <stdio.h> #include "other.h" int main (void) { printf("%d\n", getfavoritenumber()); return 0; } other.cpp #include "other.h" int getfavoritenumber(void) { return 3; } other.h #ifndef _OTHER_H_ #define _OTHER_H_ int getfavoritenumber(void); #endif