Operating System - HP-UX
1748051 Members
4790 Online
108758 Solutions
New Discussion юеВ

gcc compiler's problem/hpux11.00

 
SOLVED
Go to solution
jiangyi_1
Advisor

gcc compiler's problem/hpux11.00

hello everyone, I have problem compiling programs under hpux11.00 and gcc3.3.2for curses example, when i compiling my programm it always report that the /usr/include/.../curses.h conflicts with the header file /usr/local/lib/hppa2.0n-hpux11.00/3.3.2/include/curses.hi am newbie with programming with hpux. Anyone can help me? Thanks in advance.I have attach the error in attachment.
3 REPLIES 3
H.Merijn Brand (procura
Honored Contributor

Re: gcc compiler's problem/hpux11.00

Do you by any chance have ncurses installed? If you change the

#include

to

#include

or have -I/your/path/to/ncurses/include in the CFLAGS, it /might/ help

Though these warnings are annoying, it is just warnings.

Another way to get arount this is to rebuild gcc from scratch, because rebuilding from scratch will re-generate the include files used by gcc based on how your current system looks. A short explanation of how to do so can be found on my ITRC site

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
jiangyi_1
Advisor

Re: gcc compiler's problem/hpux11.00

this time i have the correct /pathto/curses.h in CFLAGSbut the error still there.what shall i do the next step?the error output is in the attachmentand here is my makefileCC=gcc#CC=aCCX11_INC_PATH = -I/usr/include/X11R6X11_LIB_PATH = -L/usr/lib/X11R6XERCESCROOT=/home/jy/xerces-c_2_5_0#INC_PATH = -I. -I${XERCESCROOT}/include -I/usr/local/includeINC_PATH = -I. -I${XERCESCROOT}/include -I/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.3.2/include#LIB_PATH = -L/usr/local/lib -L/usr/lib -L${XERCESCROOT}/libLIB_PATH = -L${XERCESCROOT}/libLINK_LIBS = -lxerces-c -lncurses -lcdk -lpthread -lstdc++USERDEFINES = #-DHPUX -DDEBUGCFLAGS = -I. -I${INC_PATH} ${USERDEFINES} -w -gEXECNAME = supernocOBJ = supernoc.o present.o utils.o XMLConfigure.o XMLAdaptor.o XMLParser.o \ XMLPartition.o XMLRegion.o XMLStation.o XMLServer.oall:$(EXECNAME)$(EXECNAME):$(OBJ) $(CC) $^ -o $(EXECNAME) $(LIB_PATH) $(LINK_LIBS).cpp.o: $(CC) $(CFLAGS) -c $<.PHONY: cleanclean: rm -f *.o rm -f $(EXECNAME) rm -f core core.*
H.Merijn Brand (procura
Honored Contributor
Solution

Re: gcc compiler's problem/hpux11.00

GNU gcc probably needs the extended defines that HP C-ANSI-C enables with -Ae

try to add

-D_HPUX_SOURCE

to your CFLAGS and see if that helps

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn