I have been writing a medium sized program using netbeans IDE. In early phases, code reuse was kept to a minimum. Any time I had to reuse a class I just copied and paste the header and cpp file in the sub project when needed.
The following stage relies heavily on the classes used in other sub projects.
I have defined a dynamic library for this. Netbeans allows me place for source code and header files...
When compiling I receive errors that none of the function members are defined...
I have some class templates (of which the definitions are in the header file as required). Compiling them is no problem.
When in IDE, the code which calls the library can autogenerate member functions and all seems well. It's only compiling that gives me problems.
I take it, if I remove the cpp files and copy the definitions in the header a là the template classes everything will work?(I'm devising this as I'm typing) => EDIT: Huurah this is the case
I guess the question relegates itself to why this is the case and if this is indeed the solid approach?