Getting following error when running gmake command

"/appl/SUNWspro/prod/include/CC/rw7/rw/rstream.h", line 46: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/rstream.h", line 46: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/rstream.h", line 46: Error: The type "istream" is incomplete.

"/appl/SUNWspro/prod/include/CC/rw7/rw/vstream.h", line 92: Error: The name ios is ambiguous, ios and std::ios.

"/appl/SUNWspro/prod/include/CC/rw7/rw/vstream.h", line 92: Error: eofbit is not a member of ios.

"/appl/SUNWspro/prod/include/CC/rw7/rw/vstream.h", line 93: Error: The name ios is ambiguous, ios and std::ios.

"/appl/SUNWspro/prod/include/CC/rw7/rw/vstream.h", line 93: Error: failbit is not a member of ios.

"/appl/SUNWspro/prod/include/CC/rw7/rw/vstream.h", line 94: Error: The name ios is ambiguous, ios and std::ios.

"/appl/SUNWspro/prod/include/CC/rw7/rw/vstream.h", line 94: Error: badbit is not a member of ios.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 347: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 347: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 348: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 348: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 350: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 350: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 351: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 351: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 352: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 352: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 449: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 449: Error: The name istream is ambiguous, istream and std::istream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 450: Error: The name ostream is ambiguous, ostream and std::ostream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 450: Error: The name ostream is ambiguous, ostream and std::ostream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/stringid.h", line 50: Error: The name ostream is ambiguous, ostream and std::ostream.

"/appl/SUNWspro/prod/include/CC/rw7/rw/stringid.h", line 50: Error: The name ostream is ambiguous, ostream and std::ostream.

I am using SUn studio 11

below is the makefile on the location where i give gmake command

========

#################################

# Define the names of the component definition files, without their

# extension. Definitions are as follows:

#

# JSI_NAMES- the basename of each .jsi file to be built.

#Skeleton (*_skel.cc, *_skel.hh) files will

#be generated for each entry in this list.

# INTERFACE_NAMES- the basename of each BVI_ class file to be built.

#The interface class names are those referenced from

#JS scripts. The interface file may or may not have

#a corresponding 'implementation' file (if not, the

#implementation is assumed to have been done entirely

#in the interface file itself.) An *.hh and *.cc

#file will be assumed to exist for each entry.

# IMPLEMENTATION_NAMES - The basename of each BVC_ class file to be built.

#The implementation classes are (presumably) those

#that are referenced from BVI_ classes, plus any

#other class files necessary, even if they aren't

#used directly as components. An *.hh and *.cc

#file will be assumed to exist for each entry.

#################################

JSI_NAMES = \

invoice

INTERFACE_NAMES = \

invoice_i

IMPLEMENTATION_NAMES = \

invoice_c

#CLIENT_OBJS = ecbaseC.o ecmqtransportC.o priceManagerCache.o priceManagerData.o bvxmlbridge.o MQTransportHandler.o

#CLIENT_OBJS = ecbaseC.o ecmqtransportC.o MQTransportHandler.o

#IDL_STUBS = ecbase.hh ecmqtransport.hh ecbaseC.cc ecbaseC.cc ecmqtransportC.cc ecmqtransportC.cc

#################################

# Define the 'base' name of the library that will be checked for

# and generated. The name given here will have 'lib' prepended, and

# '.so' appended, so it follows the standard Unix library naming format.

#################################

LIBRARY_NAME := invoice

#################################

# define the directory that is the root of the BroadVision One-to-One

# installation on your system.

#################################

ifndef BV1TO1

BV1TO1 := /appl/bv1to1

#BV1TO1 := /appl/bv1to15.5

endif

#################################

# Define the standard location of BV1TO1 include files.

#################################

BV1TO1_INCLUDE := $(BV1TO1)/include/cpp

#################################

# Assume that the Orbix in use is the one supplied with the

# One-To-One software. This variable MUST be defined.

#################################

ORBIX_INCLUDE := $(BV1TO1)/orbix/include

#################################

# To compile a component library, you must have a licensed copy of the

# Rogue Wave Software class libraries. They can be licensed separately

# from Rogue Wave. Point to their directory.

#################################

ROGUEWAVE_INCLUDE := $(BV1TO1)/rogue

##############

###############

SHARED_MQ_ORBIX_INCLUDE := ../../procroot/MQ/idl

MQTRANSPORT_INCLUDE := ../../procroot/MQ/include

# Build search path for all required C++ header files, the compiler

# directory should always appear last:

O_ALLINCLUDES = \

-I. \

-I$(BV1TO1)/include/cpp \

-I$(ROGUEWAVE_INCLUDE) \

-I$(ORBIX_INCLUDE) \

-I$(SHARED_MQ_ORBIX_INCLUDE) \

-I$(MQTRANSPORT_INCLUDE) \

-I$(COMPILERINCLUDES)

# Build linker search path for sharable and static libraries:

LDPATH = \

-L. \

-L$(BV1TO1)/lib \

-L$(ROGUEWAVE)/lib \

-L$(ORBIX)/lib

# Build runtime search path for sharable libraries:

RUNPATH = \

-R$(BV1TO1)/lib \

-R$(ROGUEWAVE)/lib \

-R$(ORBIX)/lib

# Use Sun's C++ compiler:

CC = CC

LD = $(CC)

# Debugger/optimizer flag:

OPTDEBUG = -g

# Some required symbols:

O_ADD_DEFINES= -D__EXTERN_C__=1 -DSVR4 -Dtrue=1 -Dfalse=0 \

-DEXCEPTIONS -D_REENTRANT -DRW_MULTI_THREAD -DNONE_CLASH -DIT_CATCH_ENV_EH -DIT_EX_MACROS -DRW_NO_FRIEND_INLINE_DECL

# Compiler flags:

O_CFLAGS = $(OPTDEBUG) -pic -pta -mt $(O_ADD_DEFINES) $(O_ALLINCLUDES) \

$(XMLC_DEFINES) $(OSPACE_DEFINES) $(XMLHELPER_DEFINES) \

-I$(XMLC_INCDIR) -I$(OSPACE_INCDIR) -I$(OSPACE_TOOLKIT_INCDIR) -I$(OSPACE_STD_INCDIR) -I$(XMLHELPER_INCDIR)

# Linker flags (note that Sun's optimizations seem to require the

# compiler's -I options at link time):

O_LFLAGS = $(OPTDEBUG) -pic -pta -mt $(O_ADD_DEFINES) \

$(O_ALLINCLUDES) $(LDPATH) $(RUNPATH) \

-R -L$(XMLC_LIBDIR) -L$(XMLHELPER_LIBDIR) $(XMLC_LIBS) $(XMLHELPER_LIBS) $(OSPACE_LIBS)

# Use idl compiler

IDL = $(BV1TO1)/orbix/bin/idl

IDLFLAGS = -B -I$(BV1TO1)/include/idl

###########################################################

#

# The following One-To-One libraries should be included

# in this order for all clients.

#

###########################################################

# List Orbix libraries:

ORBIX_LIBS = \

-lorbixmt

# List required system-supplied libraries (some client applications may

# also require -ly and -ll):

SYSLIBS = \

-lnsl \

-lsocket

# Default rule to compile C++ source code:

.SUFFIXES:

.SUFFIXES: .cc .idl

%.o: %.cc

$(CCC) $(O_CFLAGS) $(CCFLAGS) -c $<

#$(CC) $(CFLAGS) -c $<

%S.cc: %.idl

$(IDL) $(IDLFLAGS) $<

%C.cc: %.idl

$(IDL) $(IDLFLAGS) $<

%.hh: %.idl

$(IDL) $(IDLFLAGS) $<

#################################

# To compile components, you need the Javascript implementation

# include files. This variable MUST be defined

#################################

JS_INCLUDE := $(BV1TO1)/js/include

#################################

# define a default 'root' directory, from which others are derived.

# For now, let's assume it is the current directory.

#################################

COMP_ROOT := $(shell /bin/pwd)

#################################

# define the directory on your system which will contain all the .so

# files to be loaded by the Interaction Manager. The default is

# given below.

#

# Note: this is where you must copy your .so file after it is built,

# or change the Interaction Manager configuration to add the directory

# to its default-object-path.

#################################

COMPONENT_LIB_DIR := $(BV1TO1)/lib/components

#################################

# Define the locations of various directories involved in the component-

# building process. We've defaulted many of these entries to the current

# directory, but you are free to change them to suit your particular setup.

# The entries define the locations of:

#

#SOURCE_DIR- your .cc and .jsi source files

#HEADER_DIR- your .hh header files

#LIBRARY_DIR- the .so files generated from your .cc files after

# compilation and linking.

#OBJECT_DIR- the .o files generated from your .cc files after

# compilation

#################################

SOURCE_DIR= $(COMP_ROOT)

HEADER_DIR= $(COMP_ROOT)

LIBRARY_DIR= $(COMP_ROOT)

OBJECT_DIR= $(COMP_ROOT)

#################################

# Given the 'base' name of the library, calculate the full name,

# in standard Unix library-name format.

#################################

FULL_LIBRARY_NAME := $(LIBRARY_DIR)/lib/lib$(LIBRARY_NAME).so

LIBRARY_VERSION := 1

#################################

# define the list of directories where header files (.h and .hh) can be

# found (or at least from where we can start.) These will be used both

# for the -I include paths and for vpath entries, so that we can establish

# dependencies on the header files for each C++ target.

# Note: we don't directly include the include dir for object headers--we

# use <objects/xxx.hh> format in our source instead.

#################################

HEADER_DIRS := \

$(HEADER_DIR)\

$(BV1TO1_INCLUDE)\

$(ORBIX_INCLUDE)\

$(ROGUEWAVE_INCLUDE)\

$(JS_INCLUDE)

#################################

# Include each of the header directories with a '-I' in front

# for the compiler.

#################################

INCLUDES = $(HEADER_DIRS:%=-I%)

#################################

# define the vpath for various classes of files, so we don't always have

# to list the directory in which we're checking for them. Note that

# 'vpath' MUST be lowercase, according to GNU make rules.

#################################

vpath %.hh$(HEADER_DIRS)

vpath %.h$(HEADER_DIRS)

#################################

# Define flags to be used for compilation.

# The DEFINES flags mean:

#DEBUG- enable the compiler to generate symbols so you can do

#run a debugger like dbx on your objects. Highly recommended!

#NONE_CLASH - needed by the RogueWave and Orbix code included with

#One-to-One. DO NOT remove this compiler option!

#TRACING- Turn on trace messages from the Dynamic Objects and

#Interaction Manager. This may result in much more information

#than you need. If this symbol is removed, tracing messages

#are compiled out.

#################################

PROFILE=

DEFINES = -DDEBUG -DNONE_CLASH -DTRACING

JSIC= $(BV1TO1)/bin/jsic

CCC= CC

JSFLAGS = -DJS_THREADSAFE -DJSFILE

PICFLAGS = -KPIC

MTFLAGS = -mt -DRW_MULTI_THREAD

CDEBUGFLAGS = -g

CCFLAGS += $(CDEBUGFLAGS) $(MTFLAGS) $(JSFLAGS) \

$(PICFLAGS) $(INCLUDES) $(DEFINES)

#################################

# Given the list of JSI, interface and implementation file roots,

# compute the lists of actual files that need to be generated and/or

# compiled to assemble the final library.

#################################

JSI_BASENAMES = $(basename $(strip $(JSI_NAMES)))

JSI_HH_FILES = $(JSI_BASENAMES:%=$(SOURCE_DIR)/%_skel.hh)

JSI_CC_FILES = $(JSI_BASENAMES:%=$(SOURCE_DIR)/%_skel.cc)

JSI_OBJ_FILES = $(JSI_BASENAMES:%=$(OBJECT_DIR)/%_skel.o)

INTERFACE_BASENAMES = $(basename $(strip $(INTERFACE_NAMES)))

INTERFACE_HH_FILES = $(INTERFACE_BASENAMES:%=$(SOURCE_DIR)/%.hh)

INTERFACE_CC_FILES = $(INTERFACE_BASENAMES:%=$(SOURCE_DIR)/%.cc)

INTERFACE_OBJ_FILES = $(INTERFACE_BASENAMES:%=$(OBJECT_DIR)/%.o)

IMPLEMENTATION_BASENAMES = $(basename $(strip $(IMPLEMENTATION_NAMES)))

IMPLEMENTATION_HH_FILES = $(IMPLEMENTATION_BASENAMES:%=$(SOURCE_DIR)/%.hh)

IMPLEMENTATION_CC_FILES = $(IMPLEMENTATION_BASENAMES:%=$(SOURCE_DIR)/%.cc)

IMPLEMENTATION_OBJ_FILES = $(IMPLEMENTATION_BASENAMES:%=$(OBJECT_DIR)/%.o)

ALL_HH_FILES = \

$(JSI_HH_FILES) $(INTERFACE_HH_FILES) $(IMPLEMENTATION_HH_FILES)

ALL_CC_FILES = \

$(JSI_CC_FILES) $(INTERFACE_CC_FILES) $(IMPLEMENTATION_CC_FILES)

CWD_OBJ_FILES = \

$(JSI_OBJ_FILES) $(INTERFACE_OBJ_FILES) $(IMPLEMENTATION_OBJ_FILES) $(CLIENT_OBJS)

ALL_OBJ_FILES = $(CWD_OBJ_FILES)

##########################

# define the major targets:

#

#all : make everything

# clean :

##########################

.PHONY: all clean

all:$(FULL_LIBRARY_NAME)

clean:

-rm -f $(FULL_LIBRARY_NAME)

-rm -f $(FULL_LIBRARY_NAME).$(LIBRARY_VERSION)

-rm -f $(CWD_OBJ_FILES)

-rm -f $(JSI_HH_FILES)

-rm -f $(JSI_CC_FILES)

-rm -f lib/lib*

-rm -rf Templates.DB

-rm -f *~ dbx.log core

$(FULL_LIBRARY_NAME): $(ALL_OBJ_FILES)

-@echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"

-@echo "Building component library '$@'"

-@echo `date`

-@rm -f $@.$(LIBRARY_VERSION) $@

$(CCC) -G $(MTFLAGS) -o $@.$(LIBRARY_VERSION) \

-h $(notdir $@).$(LIBRARY_VERSION) $^ \

-L $(BV1TO1)/lib \

-L $(BV1TO1)/lib/components \

-L $(BV1TO1)/orbix/lib\

-L $(BV1TO1)/rogue/lib\

-L ../../procroot/MQ/lib\

-R $(COMPONENT_LIB_DIR)\

-R $(BV1TO1)/lib \

-R $(BV1TO1)/lib/components \

-R $(BV1TO1)/orbix/lib\

-R $(BV1TO1)/rogue/lib\

-R $../../procroot/MQ/lib\

-l bvbasic -lbvdata -lorbixmt -lMQTransportHandler -lbvc -lrwtool_mt -ljsrt -lbuiltin\

(cd $(LIBRARY_DIR)/lib; \

ln -s $(notdir $@).$(LIBRARY_VERSION) $(notdir $@))

#################################

# build the _skel.cc files using the JSI compiler. We assume that

# they will be built in the original source directory

#################################

$(JSI_CC_FILES) : $(SOURCE_DIR)/%_skel.cc: $(SOURCE_DIR)/%.jsi

-@echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"

-@echo "Building skeleton code file '$@'"

$(JSIC) $(JSICFLAGS) $<

$(JSI_HH_FILES) : %_skel.hh: %.jsi

-@echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"

-@echo "Building skeleton header file '$@'"

$(JSIC) $(JSICFLAGS) $<

#################################

# build the .o files and put them into the OBJECT_DIR directory.

# We assume that the OBJECT_DIR exists.

#################################

$(OBJECT_DIR)/%.o: $(SOURCE_DIR)/%.cc

-@echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"

-@echo "Building component file '$@'"

-@echo `date`

-@echo

$(CCC) -c $(CCFLAGS) -o $@ $<

[17027 byte] By [supplya] at [2007-11-27 1:41:26]
# 1

Header files from different iostream implementation seem to be mixed. Could you provide compiler command line (CC ....) that shows this error message?

Take a look at ROGUEWAVE_INCLUDE macro in the make file also. Does it points to folder with Rogue Wave std library headers? That may lead to mix std headers from this folder and from the Sun C++ distributive. Sun C++ uses -library command line options to select std library.

Atanasyana at 2007-7-12 0:56:50 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

Hi,

Thanxs for the reply,

Here is the command that we use :

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Building skeleton code file '/appl/home/rmondal/sandbox/comproot/invoiceLookup/invoice_skel.cc'

/appl/bv1to1/bin/jsic /appl/home/rmondal/sandbox/comproot/invoiceLookup/invoice.jsi

CC -g -pic -pta -mt -D__EXTERN_C__=1 -DSVR4 -Dtrue=1 -Dfalse=0 -DEXCEPTIONS -D_REENTRANT -DRW_MULTI_THREAD -DNONE_CLASH -DIT_CATCH_ENV_EH -DIT_EX_MACROS -DRW_NO_FRIEND_INLINE_DECL -I. -I/appl/bv1to1/include/cpp -I/appl/bv1to1/rogue -I/appl/bv1to1/orbix/include -I../../procroot/MQ/idl -I../../procroot/MQ/include -I-I -I -I -I -I -g -mt -DRW_MULTI_THREAD -DJS_THREADSAFE -DJSFILE -KPIC -I/appl/home/rmondal/sandbox/comproot/invoiceLookup -I/appl/bv1to1/include/cpp -I/appl/bv1to1/orbix/include -I/appl/bv1to1/rogue -I/appl/bv1to1/js/include -DDEBUG -DNONE_CLASH -DTRACING -c /appl/home/rmondal/sandbox/comproot/invoiceLookup/invoice_skel.cc

supplya at 2007-7-12 0:56:50 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

Hi,

Thanxs for the reply,

Here is the command that we use :

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Building skeleton code file '/appl/home/rmondal/sandbox/comproot/invoiceLookup/invoice_skel.cc'

/appl/bv1to1/bin/jsic /appl/home/rmondal/sandbox/comproot/invoiceLookup/invoice.jsi

CC -g -pic -pta -mt -D__EXTERN_C__=1 -DSVR4 -Dtrue=1 -Dfalse=0 -DEXCEPTIONS -D_REENTRANT -DRW_MULTI_THREAD -DNONE_CLASH -DIT_CATCH_ENV_EH -DIT_EX_MACROS -DRW_NO_FRIEND_INLINE_DECL -I. -I/appl/bv1to1/include/cpp -I/appl/bv1to1/rogue -I/appl/bv1to1/orbix/include -I../../procroot/MQ/idl -I../../procroot/MQ/include -I-I -I -I -I -I -g -mt -DRW_MULTI_THREAD -DJS_THREADSAFE -DJSFILE -KPIC -I/appl/home/rmondal/sandbox/comproot/invoiceLookup -I/appl/bv1to1/include/cpp -I/appl/bv1to1/orbix/include -I/appl/bv1to1/rogue -I/appl/bv1to1/js/include -DDEBUG -DNONE_CLASH -DTRACING -c /appl/home/rmondal/sandbox/comproot/invoiceLookup/invoice_skel.cc

supplya at 2007-7-12 0:56:51 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4

Does -I/appl/bv1to1/rogue point to Rogue Wave C++ std library? If it is true try to remove this option and use libCstd comes with Sun C++ (default command line settings) or stlport library (-library=stlport4 command line option).

If that does not help I need a small test case shows the problem.

This document http://docs.sun.com/source/819-3690/Standard.html might help too.

Atanasyana at 2007-7-12 0:56:51 > top of Java-index,Development Tools,Solaris and Linux Development Tools...