Wrox Programmer Forums
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Compilation Error furqanms Pro Java 2 September 28th, 2007 11:22 AM
compilation error pratik28 C# 1 September 24th, 2006 07:39 AM
Compilation Error allyant ASP.NET 2.0 Basics 1 August 5th, 2006 05:51 PM
Compilation error Giri ASP.NET 1.0 and 1.1 Basics 3 August 3rd, 2005 04:14 PM
compilation error saint Classic ASP Databases 2 June 23rd, 2003 04:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.