Operating System - HP-UX
1756271 Members
2562 Online
108843 Solutions
New Discussion юеВ

Re: error in include_std/limit and include_std/rw/iterator

 
SOLVED
Go to solution
dodo_ind
Occasional Advisor

error in include_std/limit and include_std/rw/iterator

I get following compile time errors on HP ITANIUM machine
"/opt/include_std/limit", line 268: error # 2321: data member initializer is not allowed
_RWSTD_STATIC_CONST (bool, is_specialized = false);

"/opt/include_std/rw/iterator", line 119: error # 2247: class template "std::iterator_traits" has already been defined
struct iterator_traits

aCC version: HP C/aCC B3910B A.06.12 and OS version is 11.23

I'm compiling using -Aa option along with -D__HP__, -D_TEMPLATE, -D_RUNTIME
Missing any compiler flags or include path? Application uses INFORMIX version 2.9.

Any help highly appreciated
10 REPLIES 10
Dennis Handly
Acclaimed Contributor

Re: error in include_std/limit and include_std/rw/iterator

What does your compile line look like?
What does your source look like?
Are you using any evil macros.

The latest version is A.06.25.01.
dodo_ind
Occasional Advisor

Re: error in include_std/limit and include_std/rw/iterator

Thanks Dennis for your response
compile line is:

aCC -I/opt/informix/incl/esql/ -I/home/test/SERVICE/src/../../incl -I. +DAportable +p -g +Z -Aa -D__HP__ -D_DEBUG -D_TEMPLATE_ -D_RUNTIME_ +inst_implicit_include -D_SERVICE_VER_=\"434D.12\" -L/home/test/service/src/../../lib -D_TEMPLATE_ -o /home/test/SERVICE/src/../exe/ser_bin service_chg.c -lservice -l servicezip /opt/informix/lib/esql/libifos.a /opt/informix/lib/esql/libifgen.a /opt/informix/lib/esql/libifgls.a -ldl -lm -lsec -lelf /opt/informix/lib/esql/libifglx.a

I'm not able to find out which source file is including limit file. -lservice and -l serviceziplibs are two libs provided by other developers for ITANIUM version
Dennis Handly
Acclaimed Contributor

Re: error in include_std/limit and include_std/rw/iterator

>aCC +DAportable -Aa +inst_implicit_include

+DAportable isn't valid, remove it.
Replace -Aa by -AA.
Remove the obsolete template style option: +inst_implicit_include

>I'm not able to find out which source file is including limit file.

You might try -H but I'm not sure your old aCC6 supports it.
dodo_ind
Occasional Advisor

Re: error in include_std/limit and include_std/rw/iterator

Made changes as suggested by you...still I get same error.

I tried adding following in the compile line:
-D_PROTOTYPES -D_XOPEN_SOURCE_EXTENDED _D_STDC -D_INCLUDE_HPUX_SOURCE -D_INCLUDE_POSIX4_SOURCE.
I got different error that some APIs such as _iqconnect, _iqstmt that are part of INFORMIX are undefined

error message:
"CFunc.ecpp", line 112: error # 2020: identifier "_iqconnect" is undefined
_iqconnect(0, dName, (char *) 0, (char *) 0, 0);


I have included informix lib path in the compile line...still it is not able to find these APIs...
I'not sure whether previous error is resolved or this error comes before that....
Dennis Handly
Acclaimed Contributor

Re: error in include_std/limit and include_std/rw/iterator

>Made changes as suggested by you. still I get same error.

(These were only to clean up things.)

>I tried adding following in the compile line:
-D_INCLUDE_HPUX_SOURCE -D_INCLUDE_POSIX4_SOURCE

You are not allowed to use these internal defines. Use: -D_HPUX_SOURCE -D_POSIX4_SOURCE

>I got different error that some APIs such as _iqconnect, _iqstmt that are part of INFORMIX are undefined

Which header should they be defined in?

>I have included informix lib path in the compile line. still it is not able to find these APIs.

You need use -I not -L/-l for header files. You have two, do you need to add more?
dodo_ind
Occasional Advisor

Re: error in include_std/limit and include_std/rw/iterator

I resolved the error by including correct header file.
But I got unsatisfied symbol error. When I added -c flag, this error disappeared.
The binary also got generated but it is of very small size than its normal size
I get error when I try to execute this binary:
/usr/bin/sh: service: Execute permission denied

I tried chmod 777. still it doesn't works...

I also used -lstd and -lstream to resolve some unsatisfied symbol error.
The code was written for HP-UX machine and I'm trying to make it work in ITANIUM
Dennis Handly
Acclaimed Contributor
Solution

Re: error in include_std/limit and include_std/rw/iterator

>When I added -c flag, this error disappeared.

It also doesn't link, don't add -c.

>I also used -lstd and -lstream to resolve some unsatisfied symbol error. I'm trying to make it work in Integrity.

The default on Integrity is -AA. You should NOT be using -lstd nor -lstream.

What are your unsats?

dodo_ind
Occasional Advisor

Re: error in include_std/limit and include_std/rw/iterator

Thanks Dennis. Will remove -c

>What are your unsats?
I don't understand your question. Could you please explain 'unsats'
Dennis Handly
Acclaimed Contributor

Re: error in include_std/limit and include_std/rw/iterator

>Could you please explain 'unsats'?

Short for "unsatisfied symbol".