I have a file, Matching.cxx, which contains some class method definitions and some other functions. It contains calls to many other classes. In my makefile I create object files for al of the other classes first and then attempt to make Matching.o. However when I do this I get an error for each appearance of these other classes. It may also be important that in the region throwing compilation errors I have created an abstract base object and I'm inheriting from some derived object based on some conditionals. I have a feeling that it is to do with not linking the object files together correctly, at present I am just making each of the other classes makefiles (this goes fine), then making the Matching.o (this fails) then I would link them all together in to the final executable. Clearly something is wrong!
Any advice greatly appreciated Cheers Jack
More details:
//declare base object:
CPPProcess* process;
if(something is true) process = new CPPProcess2j_dd();
else if...
Errors look like:
Matching.C: In function ‘CPPProcess* GenerateMGProcess(int, int, int, int*)’:
Matching.C:501: error: invalid conversion from ‘int’ to ‘CPPProcess*’
Matching.C:501: error: expected `;' before ‘CPPProcess2j_dd’