From owner-help-octave at bevo dot che dot wisc dot edu Thu Jan 18 16:17:55 1996 Subject: liboctave questions From: Andrew Smallbone To: "John W. Eaton" Cc: Andrew Smallbone , help-octave@che.utexas.edu Date: Thu, 18 Jan 1996 22:17:41 GMT >>>>> "jwe" == "John W Eaton" writes: Andrew Smallbone wrote: : : The following program: : ------- : #include "Array.h" : main(int argc, char *argv[]) : { : Array a(10); : } jwe> You need to tell the compiler to create an instance of the jwe> Array type. Try adding jwe> template class ArrayRep; jwe> template class Array; jwe> to your file. With future versions of Octave, you will only need to jwe> instantiate Array, and maybe someday, g++ will do this jwe> automatically. This fails also with the same error, but: ------ #include "Array.h" #include "Array.cc" //template class ArrayRep; // works with or without //template class Array; // these main(int argc, char *argv[]) { Array a(10); } ------ works (where Array.cc is from the liboctave directory). I think this is something to do with Implicit/Explicit Instantiation? Thanks Andrew -- _______________________________________________________ Andrew Smallbone London Para||el Applications Centre +44 171 975 5168 ---A5 AC A7 5E A2 10 81 18 09 F5 DB 6C 12 A9 07 A5---