[MINC-users] Compiling classify with gcc 3.4.3
Steve M. Robbins
steven.robbins at videotron.ca
Wed Feb 22 00:38:28 EST 2006
On Mon, Feb 20, 2006 at 03:40:31PM +0100, Olivier Colliot wrote:
> Hi,
>
> I am having trouble compiling "classify" (version 1.0, but the problem
> is the same with 0.99)
> It seems to me that the problem is coming from gcc 3.4.3
>
> I included the error message at the end of the email.
> It seems that the error comes from the fact that default arguments are
> no longer permitted in a typedef (which is done at line 26 of the file
> 'class_protos.h').
>
> Has anybody encountered the same problem ?
It looks like Bert has.
I just built the tip of CVS using gcc 4 without trouble. Then I
looked in the ChangeLog and found that Bert had fixed it up. Here's
the diff:
Index: class_protos.h
===================================================================
RCS file: /software/source/INSECT/classify/class_protos.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -B -r1.1 -r1.2
--- class_protos.h 20 Mar 2002 22:16:34 -0000 1.1
+++ class_protos.h 11 Feb 2005 20:15:38 -0000 1.2
@@ -23,7 +23,7 @@
typedef void (*Load_Training)(char *filename);
typedef void (*Save_Training)(char *filename);
typedef void (*Train)();
-typedef void (*Classify)(int *class_num, Real *class_probs = 0, int *class_labels = 0);
+typedef void (*Classify)(int *class_num, Real *class_probs, int *class_labels);
/* FUNCTION PROTOTYPES */
Regards,
-Steve
More information about the MINC-users
mailing list