Orange Forum • View topic - Compilation under gcc4.1

Compilation under gcc4.1

Report bugs (or imagined bugs).
(Archived/read-only, please use our ticketing system for reporting bugs and their discussion.)
Forum rules
Archived/read-only, please use our ticketing system for reporting bugs and their discussion.

Compilation under gcc4.1

Postby dogacan » Wed Apr 19, 2006 7:10

Hello,

I created a simple patch for orange's source module that I pulled from latest cvs so that it compiles under g++4.1. I am not sure if I am doing the right thing, but it seems to work for me.

Code: Select all
? corn/obj
? include/makefile.deps
? include/obj
? orange/makefile.deps
? orange/obj
? orange/ppp
? orange/px
? orangene/makefile.deps
? orangene/obj
? orangene/ppp
? orangene/px
? orangeom/makefile.deps
? orangeom/obj
? orangeom/ppp
? orangeom/px
? pyxtract/pyxtractstructures.pyc
? statc/obj
Index: orange/distvars.cpp
===================================================================
RCS file: /CVS/source/orange/distvars.cpp,v
retrieving revision 1.24
diff -p -u -2 -r1.24 distvars.cpp
--- orange/distvars.cpp   14 Feb 2005 16:04:38 -0000   1.24
+++ orange/distvars.cpp   19 Apr 2006 06:02:15 -0000
@@ -1101,5 +1101,5 @@   TSimpleRandomGenerator rg(sum);
 
   int wins=0;
-  const_iterator best=0;
+  const_iterator best=begin();
   const_this_ITERATE(i)
     if (   (wins==0) && ((wins=1)==1)
@@ -1121,5 +1121,5 @@   TSimpleRandomGenerator rg(sum);
 
   int wins=0;
-  const_iterator best=0;
+  const_iterator best=begin();
   const_this_ITERATE(i)
     if (   (wins==0) && ((wins=1)==1)
Index: orange/learn.cpp
===================================================================
RCS file: /CVS/source/orange/learn.cpp,v
retrieving revision 1.2
diff -p -u -2 -r1.2 learn.cpp
--- orange/learn.cpp   30 Jun 2005 09:44:23 -0000   1.2
+++ orange/learn.cpp   19 Apr 2006 06:02:16 -0000
@@ -114,7 +114,7 @@
 
 PClassifier TLearner::smartLearn(PExampleGenerator gen, const int &weight,
-                                 PDomainContingency &dcont,
-                                 PDomainDistributions &ddist,
-                                 PDistribution &dist)
+                                 PDomainContingency dcont,
+                                 PDomainDistributions ddist,
+                                 PDistribution dist)
 {
   switch (needs) {
Index: orange/learn.hpp
===================================================================
RCS file: /CVS/source/orange/learn.hpp,v
retrieving revision 1.4
diff -p -u -2 -r1.4 learn.hpp
--- orange/learn.hpp   30 Jun 2005 09:44:23 -0000   1.4
+++ orange/learn.hpp   19 Apr 2006 06:02:16 -0000
@@ -49,7 +49,7 @@   virtual PClassifier operator()(PExampl
 
   virtual PClassifier smartLearn(PExampleGenerator, const int &weight,
-                                  PDomainContingency & = PDomainContingency(),
-                                 PDomainDistributions & = PDomainDistributions(),
-                                 PDistribution & = PDistribution());
+                                  PDomainContingency = PDomainContingency(),
+                                 PDomainDistributions = PDomainDistributions(),
+                                 PDistribution =  PDistribution());
 };
 
Index: orange/lib_preprocess.cpp
===================================================================
RCS file: /CVS/source/orange/lib_preprocess.cpp,v
retrieving revision 1.30
diff -p -u -2 -r1.30 lib_preprocess.cpp
--- orange/lib_preprocess.cpp   20 Apr 2005 20:53:29 -0000   1.30
+++ orange/lib_preprocess.cpp   19 Apr 2006 06:02:24 -0000
@@ -373,5 +373,5 @@   PYERROR(PyExc_TypeError, "VariableFilt
 }
 
-
+template <>
 int TMM_VariableFilterMap::_setitemlow(TVariableFilterMap *aMap, PyObject *pykey, PyObject *pyvalue)
 { PyTRY
@@ -381,5 +381,5 @@   PyCATCH_1
 }
 
-
+template <>
 PyObject *TMM_VariableFilterMap::_setdefault(TPyOrange *self, PyObject *args)
 { PyObject *pykey;

Postby Janez » Tue Jun 13, 2006 10:36

Thanks for the patches: they work!

Janez


Return to Bugs



cron