[omniORB] Compiling programs

jorgefm at cirsa.com jorgefm at cirsa.com
Thu Jan 29 16:46:06 GMT 2004


>Hi everyone,
>
>Can somebody explain me how I can manually compile programs, that use
>omniORB4, with gcc? More specific how do I specify all the omniORB4
>libraries and all the right include files?
>
>If do "gcc -o main comp_i.c main.c" it generates off course a lot of
>errors because gcc cannot find the right includes and libraries. How can
>I fix it?
>
>THANKS IN ADVANCE
>

Hi,

I use the following definitions to compile a test program.
I hope this helps,

Jorge



CPPFLAGS=-g -Wall -Wno-deprecated -Wno-unused -fexceptions
OMNI_CPPFLAGS=-D__OMNIORB4__ -D_REENTRANT -D__OSVERSION__=2 -D__linux__
-D__x86__
OMNI_INCLUDES=-I. -I/usr/local/omni/include
OMNI_LIBS=-L/usr/local/omni/lib -lomniORB4 -lomnithread -lpthread

all: server client


server:server.o horaI.o horaSK.o nameservice.o
      g++ -o server server.o horaI.o horaSK.o nameservice.o $(OMNI_LIBS)


client:client.o horaSK.o nameservice.o
      g++ -o client client.o horaSK.o nameservice.o $(OMNI_LIBS)

%.o:%.cpp
      g++ $(CPPFLAGS) $(OMNI_CPPFLAGS) $(OMNI_INCLUDES) -c $< -o $@

%.o:%.cc
      g++ $(CPPFLAGS) $(OMNI_CPPFLAGS) $(OMNI_INCLUDES) -c $< -o $@








More information about the omniORB-list mailing list