Trying to implement my very first CORBA server (with ACE/TAO ORB implementation) I use the following makefile:
#compiler
CC=g++
#compiler options
CPPFLAGS=-Wall -I. -I/usr/include/ -I/usr/include/orbsvcs/
LFLAGS=-L/usr/lib64/ -lACE -lTAO -lTAO_PortableServer -lTAO_DynamicAny -lTAO_CosNotification -lTAO_CosNaming
#source files
SOURCES=$(wildcard *.cpp)
#object files
OBJECTS=$(SOURCES:.cpp=.o)
#executable filename
EXECUTABLE=main
#Special symbols used:
#$^ - is all the dependencies (in this case =$(OBJECTS) )
#$@ - is the result name (in this case =$(EXECUTABLE) )
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
#$(LINK.o) $^ -o $@
$(CC) $(LFLAGS) $^ -o $@
%.o: %.c
$(CC) $(CPPFLAGS) -c $<
clean:
- rm -rf $(EXECUTABLE) $(OBJECTS)
and I get the following error on compilation:
g++ -Wall -I. -I/usr/include/ -I/usr/include/orbsvcs/ -c -o cryptC.o cryptC.cpp
g++ -Wall -I. -I/usr/include/ -I/usr/include/orbsvcs/ -c -o cryptS.o cryptS.cpp
g++ -Wall -I. -I/usr/include/ -I/usr/include/orbsvcs/ -c -o main.o main.cpp
In file included from main.cpp:5:
CryptographicImpl.h: In member function ‘virtual char* CryptographicImpl::decrypt(const CaesarAlgorithm::charsequence&, CORBA::ULong, CORBA::ULong)’:
CryptographicImpl.h:49: warning: comparison between signed and unsigned integer expressions
#g++ cryptC.o cryptS.o main.o -o main
g++ -L/usr/lib64/ -lTAO_PortableServer -lTAO_DynamicAny -lACE -lTAO -lTAO_CosNotification -lTAO_CosNaming cryptC.o cryptS.o main.o -o main
cryptC.o: In function `TAO::Objref_Traits<CaesarAlgorithm>::marshal(CaesarAlgorithm*, TAO_OutputCDR&)':
cryptC.cpp:(.text+0x7f): undefined reference to `CORBA::Object::marshal(CORBA::Object*, TAO_OutputCDR&)'
whole compilation log: http://pastebin.com/0KpLXixw
I use ACE (6.2.8) and TAO(2.2.8) from this repo on my CentOS 6.6