I'm writing a program, with header files and .cpp files.
However, when I call a function that is declared in the header
and defined in the .cpp file, I get a linker error: unresolved external
I can "fix" the problem by putting all the code for the functions in the .h
file. Then, the linker sees the function definition, and links OK.
But, I want to keep the interface and the implementation separate.
i.e. - I want to put the function definitions inside the .cpp file, but without the
unresolved extenal error. I'm using a Borland 5.5 command-line compiler.
Any clues?
However, when I call a function that is declared in the header
and defined in the .cpp file, I get a linker error: unresolved external
I can "fix" the problem by putting all the code for the functions in the .h
file. Then, the linker sees the function definition, and links OK.
But, I want to keep the interface and the implementation separate.
i.e. - I want to put the function definitions inside the .cpp file, but without the
unresolved extenal error. I'm using a Borland 5.5 command-line compiler.
Any clues?