From mboxrd@z Thu Jan 1 00:00:00 1970 From: jpyubero To: gcc-help@gcc.gnu.org Subject: Template problem Date: Mon, 02 Apr 2001 07:20:00 -0000 Message-id: <3AC88C48.EEC7AFDB@elai.upm.es> X-SW-Source: 2001-04/msg00006.html Hi, I compiled the program Xvision perfetly under RedHat, but now I`ve install Mandrake and It's no possible. When I typing make the exit is: make g++ -g -I- -I. -I~/xvision/include -I~/xvision -w -c prueba.cxx -o prueba.o In file included from Video.hh:41, from CWindow.hh:34, from BasicFeature.hh:37, from FTypes.hh:32, from Line.hh:33, from prueba.cxx:5: Image.hh:31: return type specified for `operator XVImage' make: *** [prueba.o] Error 1 The file Image.hh is: #ifndef Image_hh #define Image_hh #include "Tracker.hh" #include "XVImage.hh" class Image : public XVImage { public: Image (int ncols_in = 0, int nrows_in = 0) : XVImage(nrows_in, ncols_in) {} Image (XVImage& im) : XVImage(im) {} #if (XV_OS == XV_IRIX) operator XVImage() { float* floatData = new float[storesize]; for (int i = 0; i < storesize; i++) floatData[i] = (float)image[i]; XVImage newImage(nrows, ncols, floatData delete floatData; return newImage; } #else XVImage operator XVImage() { //Number of line 31 float* floatData = new float[storesize]; for (int i = 0; i < storesize; i++) floatData[i] = (float)image[i]; XVImage newImage(nrows, ncols, floatData delete floatData; return newImage; } #endif }; #endif Image_hh And the lines where is implemented in another file is: template XVImage &operator >>(const ColVector &x,XVImage &y); template XVImage &operator >>(const RowVector &x,XVImage &y); Can anyboby help me? Sorry for my english Thanks.