Discussion:
[omniORB] linking cygomniZIOPDynamic4.dll.2 failed - "undefined reference to"
szyk100
2014-10-04 14:29:28 UTC
Permalink
Hello
I try build Omniorb with Cygwin32 but I have strange linker error. Few first lines of this error are as follow:

+ rm -f shared/cygomniZIOPDynamic4.dll.2.0
+ g++ -shared -Wl,-soname=cygomniZIOPDynamic4.dll.2,--out-implib=libomniZIOPDynamic4.dll.a,--export-dynamic,--enable-auto-import -o shared/cygomniZIOPDynamic4.dll.2.0 -L../../../../lib -L../../../../lib shared/omniZIOPDynamic.o shared/compressionDynStubs.o shared/ziopDynStubs.o -L../orbcore/shared -lomniORB4 -lomnithread -lpthread
/usr/lib/gcc/i686-pc-cygwin/4.8.3/../../../../i686-pc-cygwin/bin/ld: warning: --export-dynamic is not supported for PE targets, did you mean --export-all-symbols?
shared/omniZIOPDynamic.o:omniZIOPDynamic.cc:(.text+0x35): undefined reference to `CORBA::Any::operator>>=(float&) const'
shared/omniZIOPDynamic.o:omniZIOPDynamic.cc:(.text+0x44): undefined reference to `omniZIOP::create_compression_min_ratio_policy(float)'
shared/omniZIOPDynamic.o:omniZIOPDynamic.cc:(.text+0x60): undefined reference to `CORBA::Any::operator>>=(unsigned long&) const'
shared/omniZIOPDynamic.o:omniZIOPDynamic.cc:(.text+0x6f): undefined reference to `omniZIOP::create_compression_low_value_policy(unsigned long)'
shared/omniZIOPDynamic.o:omniZIOPDynamic.cc:(.text+0x94): undefined reference to `CORBA::Any::operator>>=(CORBA::Any::to_boolean) const'
shared/omniZIOPDynamic.o:omniZIOPDynamic.cc:(.text+0xa4): undefined reference to `omniZIOP::create_compression_enabling_policy(bool)'
shared/omniZIOPDynamic.o:omniZIOPDynamic.cc:(.text+0xde): undefined reference to `omniZIOP::create_compression_id_level_list_policy(Compression::CompressorIdLevelList const&)'

I know that this undefined references are in other dlls but I have no idea how to fix make files.

regards
Szyk
Duncan Grisby
2014-10-07 15:09:22 UTC
Permalink
Post by szyk100
+ rm -f shared/cygomniZIOPDynamic4.dll.2.0
+ g++ -shared -Wl,-soname=cygomniZIOPDynamic4.dll.2,--out-implib=libomniZIOPDynamic4.dll.a,--export-dynamic,--enable-auto-import -o shared/cygomniZIOPDynamic4.dll.2.0 -L../../../../lib -L../../../../lib shared/omniZIOPDynamic.o shared/compressionDynStubs.o shared/ziopDynStubs.o -L../orbcore/shared -lomniORB4 -lomnithread -lpthread
/usr/lib/gcc/i686-pc-cygwin/4.8.3/../../../../i686-pc-cygwin/bin/ld: warning: --export-dynamic is not supported for PE targets, did you mean --export-all-symbols?
shared/omniZIOPDynamic.o:omniZIOPDynamic.cc:(.text+0x35): undefined reference to `CORBA::Any::operator>>=(float&) const'
Does it work if you edit src/lib/omniORB/ziopdynamic/dir.mk to so where
it sets LIB_IMPORTS it says:

LIB_IMPORTS := $(patsubst %,$(LibPathPattern),../orbcore/shared) \
$(OMNIORB_DLL_NAME) $(OMNIORB_DYNAMIC_DLL_NAME) \
$(OMNITHREAD_LIB) $(EXTRA_LIBS)


i.e. add the $(OMNIORB_DYNAMIC_DLL_NAME) to it.

Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
Loading...