Archived

This forum has been archived. Please start a new discussion on GitHub.

Ice 1.5.1 slice2cpp's implement can't build in fedora core 1

I use Ice 1.5.1

slice2cpp's implement can't build in redhat Advanced Server 3.0 with gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20), but it's can build in redhat 9.0 with gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) and in fedora core 1 with gcc version 3.3.2 20031022 (Red Hat Linux 3.3.2-1)

The following is my Ice file

cat phonelist.ice
#ifndef _PHONELIST_ICE
#define _PHONELIST_ICE

module pnote
{
sequence<int> GroupList;

struct Phone
{
string PhoneNo;
GroupList grpList;
};

sequence<Phone> PhoneList;
sequence<string> PhoneNumList;

interface PhoneListHome
{
idempotent bool put(Phone obj);
idempotent bool putList(PhoneList arrData);

idempotent bool del(string key);
idempotent bool delList(PhoneNumList arrKey);
idempotent void clear();

nonmutating Phone get(string key);
nonmutating PhoneList getAll();
nonmutating PhoneList getList(long lFirstNo,long lCount);
nonmutating long getRecords();

};
};

#endif _PHONELIST_ICE



I use following parameter to compile ice:
slice2cpp --impl -I../../../pnote_db/slice ../../../pnote_db/slice/phonelist.ice --output-dir ../../../pnote_db/src/web

It will create 4 files:
phonelist.cpp phonelist.h phonelistI.cpp phonelistI.h

in redhat 9.0 can build all files, but in fedora core 1 and redhat advanced server 3.0 gcc can't compile phonelistI.cpp, the following is error message:

g++ -DHAVE_CONFIG_H -I. -I../../../pnote_db/src/web -I../.. -DNDEBUG -ftemplate-depth-128 -fPIC -Wall -O2 -I. -I/opt/ice/incl
ude -I/opt/bdb/include -I/opt/log4cxx/include -c ../../../pnote_db/src/web/phonelistI.cpp -MT phonelistI.lo -MD -MP -MF .deps
/phonelistI.TPlo -fPIC -DPIC -o phonelistI.lo
In file included from ../../../pnote_db/src/web/phonelistI.cpp:1:
../../../pnote_db/src/web/phonelistI.h:10: syntax error before `{' token
../../../pnote_db/src/web/phonelistI.h:17: virtual outside class declaration
../../../pnote_db/src/web/phonelistI.h:20: virtual outside class declaration
../../../pnote_db/src/web/phonelistI.h:22: syntax error before `&' token
../../../pnote_db/src/web/phonelistI.h:23: virtual outside class declaration
../../../pnote_db/src/web/phonelistI.h:25: virtual outside class declaration
../../../pnote_db/src/web/phonelistI.h:28: virtual outside class declaration
../../../pnote_db/src/web/phonelistI.h:28: non-member function `pnote::Phone
pnote::get(const std::string&, const Ice::Current&)' cannot have `const'
method qualifier
../../../pnote_db/src/web/phonelistI.h:30: virtual outside class declaration
../../../pnote_db/src/web/phonelistI.h:30: non-member function `
pnote::PhoneList pnote::getAll(const Ice::Current&)' cannot have `const'
method qualifier
../../../pnote_db/src/web/phonelistI.h:34: virtual outside class declaration
../../../pnote_db/src/web/phonelistI.h:34: non-member function `
pnote::PhoneList pnote::getList(long long int, long long int, const
Ice::Current&)' cannot have `const' method qualifier
../../../pnote_db/src/web/phonelistI.h:36: virtual outside class declaration
../../../pnote_db/src/web/phonelistI.h:36: non-member function `Long
pnote::getRecords(const Ice::Current&)' cannot have `const' method qualifier
../../../pnote_db/src/web/phonelistI.h:39: syntax error before `}' token
../../../pnote_db/src/web/phonelistI.cpp:6: invalid use of undefined type `
class pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.h:9: forward declaration of `class
pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.cpp:13: invalid use of undefined type `
class pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.h:9: forward declaration of `class
pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.cpp:20: invalid use of undefined type `
class pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.h:9: forward declaration of `class
pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.cpp:25: syntax error before `&' token
../../../pnote_db/src/web/phonelistI.cpp:27: invalid use of undefined type `
class pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.h:9: forward declaration of `class
pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.cpp:33: invalid use of undefined type `
class pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.h:9: forward declaration of `class
pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.cpp:39: invalid use of undefined type `
class pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.h:9: forward declaration of `class
pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.cpp:45: invalid use of undefined type `
class pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.h:9: forward declaration of `class
pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.cpp:53: invalid use of undefined type `
class pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.h:9: forward declaration of `class
pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.cpp:59: invalid use of undefined type `
class pnote::PhoneListHomeI'
../../../pnote_db/src/web/phonelistI.h:9: forward declaration of `class
pnote::PhoneListHomeI'
make[3]: *** [phonelistI.lo] Error 1
make[3]: Leaving directory `/home/smsc/cvs/build/src/web'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/smsc/cvs/build/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/smsc/cvs/build'
make: *** [all] Error 2

Comments