I am doing a multifile program. There are two files first.cpp and second.cpp that I would like to include in the main file main.cpp. I have first.h and second.h, that I include using
The .h files look something like this:Code:// in file main.cpp #include "first.h" #include "second.h"
And in the files first.cpp and second.cpp, I have added the linesCode:// in files first.h and second.h #ifndef __FIRST_H #define __SECOND_H int init(void); #endif
I use the Turbo C++ 3.0 compiler. I have set the include directory to the directory that contains the .h and .cpp files. I can compile successfully, but I can't link it. The error message is 'Undefined symbol init() in module main.cpp'. Please help.Code:// in files first.cpp and second.cpp #include "first.h" #include "second.h"



LinkBack URL
About LinkBacks


