Home Help Center

IceTouch examples Linker error

SiegfriedHoraSiegfriedHora Member Siegfried HoraOrganization: LFKProject: TBD
Hi,

tried to compile one of the IceTouch examples (Ice/hello) and got following error message.
Anybody who can help ?

MyMacBookAir:hello Siegfried$ make
rm -f client
c++ -g -ftemplate-depth-128 -Wall -D_REENTRANT -L/opt/IceTouch-1.0/lib -o client Hello.o Client.o -lIceObjC -framework Foundation
ld: warning: in /opt/IceTouch-1.0/lib/libIceObjC.dylib, file is not of required architecture
Undefined symbols:
"_OBJC_METACLASS_$_ICEObject", referenced from:
_OBJC_METACLASS_$_DemoHello in Hello.o
"_OBJC_CLASS_$_ICEInitializationData", referenced from:
[email protected] in Client.o
"_OBJC_CLASS_$_ICEUtil", referenced from:
[email protected] in Client.o
"_ICEInternalLookupString", referenced from:
-[DemoHello dispatch__:is:os:] in Hello.o
"_OBJC_EHTYPE_$_ICELocalException", referenced from:
_main.lsda in Client.o
"_OBJC_CLASS_$_ICEUnknownUserException", referenced from:
[email protected] in Hello.o
"_OBJC_METACLASS_$_ICEObjectPrx", referenced from:
_OBJC_METACLASS_$_DemoHelloPrx in Hello.o
"_ICEInternalCheckModeAndSelector", referenced from:
+[DemoHello sayHello___:current:is:os:] in Hello.o
+[DemoHello shutdown___:current:is:os:] in Hello.o
"_OBJC_EHTYPE_$_ICEException", referenced from:
_run.lsda in Client.o
"_OBJC_CLASS_$_ICEOperationNotExistException", referenced from:
[email protected] in Hello.o
"_OBJC_CLASS_$_ICEObject", referenced from:
_OBJC_CLASS_$_DemoHello in Hello.o
[email protected] in Hello.o
"_OBJC_EHTYPE_$_ICEUserException", referenced from:
+[DemoHelloPrx sayHello___:prx:context:].lsda in Hello.o
+[DemoHelloPrx shutdown___:context:].lsda in Hello.o
"_OBJC_CLASS_$_ICEObjectPrx", referenced from:
_OBJC_CLASS_$_DemoHelloPrx in Hello.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [client] Error 1

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Welcome to the forums!

    This warning:
    ld: warning: in /opt/IceTouch-1.0/lib/libIceObjC.dylib, file is not of required architecture
    

    indicates that you are compiling the demo with an architecture that is different from the IceObjC library. Most likely, you are compiling the demo in 64 bits mode whereas the library is 32 bits (you can use the "file" utility to figure out the architecture of a given library/object, e.g.: "file /opt/IceTouch-1.0.0/lib/libIceObjC.dylib").

    You have 2 options:
    • you change the demo build system to compile the demos with the right architecture. To do this, edit the config/Make.rules.Darwin file from the demo distribution and add "-arch i386" to the CFLAGS/CXXFLAGS variables.
    • you download the IceTouch source distribution and rebuild Ice Touch using your default architecture.

    Let us know if you need further help with this!

    Cheers,
    Benoit.
  • SiegfriedHoraSiegfriedHora Member Siegfried HoraOrganization: LFKProject: TBD
    Thanks,

    option 1 helped.
    Now example compiles.
Sign In or Register to comment.