[omniORB] FW: Linking errors while using omniORB with VC++5.0.

Michael J. Donahue Michael_J._Donahue/MCLEOD@McLeodUSA.com
Wed, 14 Jun 2000 09:47:23 -0500


Ravindra -

I'm not exactly sure why you are seeing the problem, it looks as though you may
be missing an omniORB library in your link process.  I have included examples of
my GNUmakefile and a standard.mak file it depends on.  You should be able to
figure out what libraries or settings you may be missing from these.  The only
other thing I can see is that you may have forgot to use the -a option on your
omniidl2 step to add support for CORBA::Any.

Let me know if you still have problems...

Good Luck,

- Mike Donahue
  McLeodUSA

------------------------------------------------ cut here ------------------------------------------------
#*******************************************************************************
# GNUmakefile
#*******************************************************************************
# the following commands:
#   make             - builds all
#   make <prog_name> - builds the application designated by <prog_name>
#   make clean       - removes all intermediate files produced
#*******************************************************************************

#*******************************************************************************
# Include standard build settings and rules
#*******************************************************************************

include standard.mak

#*******************************************************************************
# Project Setup
#*******************************************************************************

EXECS          = helloworld
BACKUPDIR = save
OBJS      =
COMMONDIR = ../common
COMMONOBJS     = $(COMMONDIR)/hellotools.o
CCFLAGS        += -I$(COMMONDIR)


#*******************************************************************************
# Project Rules
#*******************************************************************************

all : $(EXECS)

backup :
     $(RM) -r               $(BACKUPDIR)
     $(MD)                  $(BACKUPDIR)
     $(CP) *.c              $(BACKUPDIR)
     $(CP) *.cpp            $(BACKUPDIR)
     $(CP) *.sqC            $(BACKUPDIR)
     $(CP) *.h              $(BACKUPDIR)
     $(CP) ../standard.mak  $(BACKUPDIR)
     $(CP) GNUmakefile      $(BACKUPDIR)

clean :
     $(RM) core $(EXECS) *.o *.bak *.log

helloworld: helloworld.o $(COMMONOBJS)
     $(CC) -o helloworld helloworld.o $(COMMONOBJS) $(LDFLAGS)

# EOF: GNUmakefile
------------------------------------------------ cut here ------------------------------------------------
#*******************************************************************************
# standard.mak
#*******************************************************************************
# Multi-threaded common Makefile definitions used by other make files
#*******************************************************************************

#*******************************************************************************
# CORBA settings
#*******************************************************************************

IDL2CPP                       = ${OMNIORB_BIN}/omniidl2

ORBINCLUDES                   = -I${OMNIORB_ROOT}/include
-I${OMNIORB_ROOT}/include/omniORB2
ORBLIBPATH                    = -L${OMNIORB_LIB}
ORB_STATIC_LIBS               = -lomniORB2-ar \
                                -lomniDynamic2-ar \
                                -lomnithread-ar \
                                -lomniLC-ar \
                                -ltcpwrapGK-ar \
                                -lpthreads
ORB_SHARED_LIBS               = -lomniORB28 \
                                -lomniDynamic28 \
                                -lomniLC3 \
                                -lomnithread2 \
                                -lpthreads

EVENTINCLUDES            = -I${OMNIORB_EVENTS_ROOT}/include \
                                -I${OMNIORB_EVENTS_ROOT}/idl
EVENTLIBPATH             = -L${OMNIORB_EVENTS_LIB}
EVENT_STATIC_LIBS        = -lomniEvents-ar
EVENT_SHARED_LIBS        = -lomniEvents

STATIC_LIBS                   = ${ORB_STATIC_LIBS} ${EVENT_STATIC_LIBS}
SHARED_LIBS                   = ${ORB_STATIC_LIBS} ${EVENT_STATIC_LIBS}

CORBA_INCLUDES           = ${ORBINCLUDES} ${EVENTINCLUDES}
CORBA_DEFINES            = -DPTHREADS -D__OMNIORB2__ -D_REENTRANT -D__aix__
-D__powerpc__ -D__OSVERSION__=4
CORBA_DEBUG                   =
CORBA_LIBPATH            = ${ORBLIBPATH} ${EVENTLIBPATH}
CORBA_LIBS                    = ${STATIC_LIBS}


#*******************************************************************************
# Compiler/Tool settings
#*******************************************************************************

CC                            = xlC_r
LD                            = xlC_r
CP                            = -cp
MD                            = -mkdir -p
RM                            = -rm -f
INSTALL                       = install-bsd -c
SED                           = sed
RANLIB                        = ranlib


#*******************************************************************************
# Compiler flags
#*******************************************************************************

#STDCC_LIBS                   = -ldl
#LIBCC                        = /usr/ibmcxx/bin/makeC++SharedLib_r -p -100
-bglink:/lib/glink.o -bM:SRE

INCLUDES                 = -I. $(CORBA_INCLUDES)
DEFINES                       = -D__STL__ $(CORBA_DEFINES)
DEBUG                         = -g -D_DEBUG $(CORBA_DEBUG)
LIBPATH                       = -L. -L/usr/vacpp/lib $(CORBA_LIBPATH)
LIBS                     = -lC_r $(CORBA_LIBS)

CCFLAGS                       = -qstaticinline $(INCLUDES) $(DEFINES) $(DEBUG)
LDFLAGS                       = $(LIBPATH) $(LIBS)


#******************************************************************************
# Standard build rules for .cpp (user code) and .C or .cc (generated code) files
#******************************************************************************

.SUFFIXES: .idl .cc .hh .cpp .C .o

.idl.cc:
     ${IDL2CPP} -a -h .hh -s .cc $<

.idl.hh:
     ${IDL2CPP} -a -h .hh -s .cc $<

.cc.o:
     $(CC) $(CCFLAGS) -c -o $@ $<

.cpp.o:
     $(CC) $(CCFLAGS) -c -o $@ $<

.C.o:
     $(CC) $(CCFLAGS) -c -o $@ $<

# EOF: standard.mak
------------------------------------------------ cut here ------------------------------------------------






"Ravindra" <Ravindra.Chinchore@datamatics.co.in> on 06/14/2000 08:08:02 AM

Please respond to Ravindra.Chinchore@datamatics.co.in

To:   "Omniorb Mailing Service (E-mail)" <omniorb-list@uk.research.att.com>
cc:    (bcc: Michael J. Donahue/MCLEOD)
Subject:  [omniORB] FW: Linking errors while using omniORB with VC++5.0.




We are getting  following  linker errors occurring while building  project
using OmniORB 2.8.0 generated stubs.
with VC++ 5.0:
1.>unresolved external symbol "public: __thiscall
CORBA::TypeCode_member::TypeCode_member(void)"
(??1TypeCode_member@CORBA@@QAE@XZ)

2.>unresolved external symbol "public: static void __cdecl
CORBA::IDLType_Helper::release(class CORBA::IDLType *)"
(?release@IDLType_Helper@CORBA@@SAXPAVIDLType@2@@Z)

3.>unresolved external symbol "public: __thiscall CORBA::Any::~Any(void)"
(??1Any@CORBA@@QAE@XZ

Pl. suggest the way out.

With Best Regards,
Ravindra
(Ravindra.Chinchore@datamatics.co.in)