Archived
This forum has been archived. Please start a new discussion on GitHub.
Compiling demos on Mac OS X 10.4.2
in Help Center
I've just started experimenting with Ice for possible use in a robotics project. I successfully compiled and ran the demos on Linux but am having trouble linking under Mac OS X 10.4.2. When I run make in the demo directory, I get the output below. I've set up the environment variables correctly, as far as I can tell, so I don't know why the linker is complaining.
% make
making all in IceUtil
making all in workqueue
rm -f workqueue
c++ -Wl,-executable_path,/Users/claude/Applications/Ice-2.1.2/bin -g -ftemplate-depth-128 -Wall -D_REENTRANT -L/Users/claude/Applications/Ice-2.1.2/lib -o workqueue WorkQueue.o -lIceUtil -lpthread
/usr/bin/ld: Undefined symbols:
typeinfo for IceUtil::NullHandleException
typeinfo for IceUtil::ThreadSyscallException
typeinfo for IceUtil::Thread
typeinfo for IceUtil::Exception
collect2: ld returned 1 exit status
make[2]: *** [workqueue] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
% make
making all in IceUtil
making all in workqueue
rm -f workqueue
c++ -Wl,-executable_path,/Users/claude/Applications/Ice-2.1.2/bin -g -ftemplate-depth-128 -Wall -D_REENTRANT -L/Users/claude/Applications/Ice-2.1.2/lib -o workqueue WorkQueue.o -lIceUtil -lpthread
/usr/bin/ld: Undefined symbols:
typeinfo for IceUtil::NullHandleException
typeinfo for IceUtil::ThreadSyscallException
typeinfo for IceUtil::Thread
typeinfo for IceUtil::Exception
collect2: ld returned 1 exit status
make[2]: *** [workqueue] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
0
Comments
-
Welcome to the forums! Which compiler do you use? The Mac OS X binary package was compiled with GCC 3.3 so you should use it to compile the demos (you can select which GCC version you want to use on Mac OS X with the gcc_select utility).
We don't support GCC 4.0 which has a bug that prevents Ice to compile. GCC 4.0.1 fixes this problem but it's not publicly available yet on Mac OS X.
Let us know if this doesn't help!
Benoit.0 -
Gcc 3.3
Thanks for the advice. I used gcc_select to switch to version 3.3, as you suggested, but I still get errors:
Default compiler has been set to:
gcc version 3.3 20030304 (Apple Computer, Inc. build 1809)
% make
making all in IceUtil
making all in workqueue
rm -f workqueue
c++ -Wl,-executable_path,/Users/claude/Applications/Ice-2.1.2/bin -g -ftemplate-depth-128 -Wall -D_REENTRANT -L/Users/claude/Applications/Ice-2.1.2/lib -o workqueue WorkQueue.o -lIceUtil -lpthread
ld: Undefined symbols:
__ZNSt15_List_node_base4hookEPS_
__ZNSt15_List_node_base6unhookEv
__ZTIN7IceUtil19NullHandleExceptionE
__ZTIN7IceUtil22ThreadSyscallExceptionE
__ZTIN7IceUtil6ThreadE
__ZTIN7IceUtil9ExceptionE
make[2]: *** [workqueue] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 10 -
Did you do a "make clean" before to run "make" again after selecting the new compiler?
Benoit.0 -
make clean
"make clean" worked. Sorry, that was a silly mistake. All the demos are working now. Thanks for the very quick responses.
Claude0