View Single Post
  #1 (permalink)  
Old February 5th, 2007, 08:37 AM
indupriyav
Guest
 
Posts: n/a
Default C++ Compilation error

When I compile my C++ program following CORBA TAO architecture, I get the following error:

Error Message:

from TRemote_i.cpp:31:

MyThread.h:27: error: `CORBA' has not been declared
MyThread.h:27: error: `Long' has not been declared
MyThread.h:27: error: ISO C++ forbids declaration of `correlationID' with no type

This is my Makefile. Please let me know what to do.

#VPATH = ..

#CFLAGS=-g3 -O0
TARGET=RemotingServer
IDL=$(ACE_ROOT)/bin/tao_idl

IDL_FILES:=$(wildcard *.idl)
IDL_PRODUCED=$(1)S.cpp $(1)S.h $(1)S.inl $(1)C.cpp $(1)C.h $(1)C.inl
IDL_IMPL=$(1)_i.cpp $(1)_i.h
IDL_BASE=$(subst .idl,,$(IDL_FILES))
PRODUCED_IDL_FILES=$(foreach idl,$(IDL_BASE),$(call IDL_PRODUCED,$(idl)))
PRODUCED_IMPL_FILES=$(foreach idl,$(IDL_BASE),$(call IDL_IMPL,$(idl)))
CLIENT_IDL_FILES:=$(subst .idl,C.cpp,$(IDL_FILES))
SERVER_IDL_FILES:=$(subst .idl,S.cpp,$(IDL_FILES))

OBJ_FILES=$(subst .cpp,.o, $(wildcard *.cpp))
OBJ_FILES += $(subst .cpp,.o,$(CLIENT_IDL_FILES))
OBJ_FILES += $(subst .cpp,.o,$(SERVER_IDL_FILES))
OBJ_FILES:=$(sort $(OBJ_FILES))

LIBPATH= -L$(ACE_ROOT)/lib
LIBRARIES=-lACE -lTAO -lTAO_PortableServer -lTAO_CosNaming -lTAO_Valuetype -lTAO_AnyTypeCode -lTAO_CosEvent -lcrypto

CPP_INCLUDES= -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs -I/usr/local/ssl/include

.PHONY: all clean debug release impl clean-pkg all-clean install

%C.cpp %C.inl %C.h %S.cpp %S.inl %S.h: %.idl
    $(IDL) -Sc $<
    @-touch $*_i.cpp $*_i.h

%_i.cpp %_i.h: %.idl
    $(IDL) -Sc -GIh _i.h -GIs _i.cpp -GIe _impl $<

%.o: %.cpp
    g++ $(CPP_INCLUDES) -c $(CFLAGS) $<

release: CFLAGS = -O3
release: all

debug: CFLAGS = -Wall -g3 -O0
debug: all

trace: CFLAGS = -DACE_NTRACE=0 -Wall -g3 -O0
trace: all

impl: $(PRODUCED_IMPL_FILES)

all: $(PRODUCED_IDL_FILES) $(TARGET)

install: RemotingServer-sparc-sol8.gz

RemotingServer-sparc-sol8.gz: $(TARGET)
    ./mkinstall.sh

$(TARGET): $(SERVER_IDL_FILES) $(CLIENT_IDL_FILES) $(OBJ_FILES)
    g++ -o $@ $(LIBPATH) $(LIBRARIES) $(OBJ_FILES)

clean:
    @-rm -f $(TARGET)
    @-rm -f *.o core *.log
    @-rm -f $(PRODUCED_IDL_FILES)
    @-rm -f RemotingServer-sparc-sol8.gz

clean-pkg:
    @-rm -rf pkg/bin pkg/etc pkg/lib

all-clean: clean
    @-rm -f $(PRODUCED_IMPL_FILES)


PLEASE HELP!!
Reply With Quote