[R-SIG-Mac] [MacOS] C++ compilation on macos
Sean Davis
sdavis2 at mail.nih.gov
Mon Jan 9 15:47:04 CET 2006
I am trying to compile a single c++ file into a shared library using R CMD
SHLIB. I am able to compile a simple executable using the same code.
However, I get the following output when compiling using R CMD SHLIB. I am
hoping that some of the Mac gurus can give me a hint about what might be
going on. I can find plenty of folks having similar problems in other
contexts, but no solutions. I am using MacOS 10.4.3, g33/g++ 3.3, and R
2.2.0.
Thanks,
Sean
G++ version specifics:
holmes: sdavis$ g++ --version
g++ (GCC) 3.3 20030304 (Apple Computer, Inc. build 1809)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Output of R CMD SHLIB....
holmes:~/Mercury/projects/R/StepGram/StepGram/src sdavis$ R CMD SHLIB
Stepgram.cpp
g++ -no-cpp-precomp -I/Users/sdavis/R-devel2/R.framework/Resources/include
-I/sw/include -I/usr/local/include -fno-common -g -O2 -c Stepgram.cpp -o
Stepgram.o
g++ -bundle -flat_namespace -undefined suppress -L/sw/lib -L/usr/local/lib
-o Stepgram.so Stepgram.o -lcc_dynamic -framework R
ld: multiple definitions of symbol __Unwind_GetRegionStart
/usr/lib/libcc_dynamic.a(unwind-dw2.o) private external definition of
__Unwind_GetRegionStart in section (__TEXT,__text)
/usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2_s.o) definition of
__Unwind_GetRegionStart
ld: multiple definitions of symbol __Unwind_DeleteException
/usr/lib/libcc_dynamic.a(unwind-dw2.o) private external definition of
__Unwind_DeleteException in section (__TEXT,__text)
/usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2_s.o) definition of
__Unwind_DeleteException
ld: multiple definitions of symbol __Unwind_FindEnclosingFunction
/usr/lib/libcc_dynamic.a(unwind-dw2.o) private external definition of
__Unwind_FindEnclosingFunction in section (__TEXT,__text)
/usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2_s.o) definition of
__Unwind_FindEnclosingFunction
ld: multiple definitions of symbol __Unwind_ForcedUnwind
/usr/lib/libcc_dynamic.a(unwind-dw2.o) private external definition of
__Unwind_ForcedUnwind in section (__TEXT,__text)
/usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2_s.o) definition of
__Unwind_ForcedUnwind
ld: multiple definitions of symbol __Unwind_GetDataRelBase
/usr/lib/libcc_dynamic.a(unwind-dw2.o) private external definition of
__Unwind_GetDataRelBase in section (__TEXT,__text)
/usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2_s.o) definition of
__Unwind_GetDataRelBase
ld: multiple definitions of symbol __Unwind_GetGR
/usr/lib/libcc_dynamic.a(unwind-dw2.o) private external definition of
__Unwind_GetGR in section (__TEXT,__text)
/usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2_s.o) definition of
__Unwind_GetGR
ld: multiple definitions of symbol __Unwind_GetIP
/usr/lib/libcc_dynamic.a(unwind-dw2.o) private external definition of
__Unwind_GetIP in section (__TEXT,__text)
/usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2_s.o) definition of
__Unwind_GetIP
ld: multiple definitions of symbol __Unwind_GetLanguageSpecificData
/usr/lib/libcc_dynamic.a(unwind-dw2.o) private external definition of
__Unwind_GetLanguageSpecificData in section (__TEXT,__text)
/usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2_s.o) definition of
__Unwind_GetLanguageSpecificData
ld: multiple definitions of symbol __Unwind_GetTextRelBase
/usr/lib/libcc_dynamic.a(unwind-dw2.o) private external definition of
__Unwind_GetTextRelBase in section (__TEXT,__text)
/usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2_s.o) definition of
__Unwind_GetTextRelBase
ld: multiple definitions of symbol __Unwind_RaiseException
/usr/lib/libcc_dynamic.a(unwind-dw2.o) private external definition of
__Unwind_RaiseException in section (__TEXT,__text)
/usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2_s.o) definition of
__Unwind_RaiseException
ld: multiple definitions of symbol __Unwind_Resume
/usr/lib/libcc_dynamic.a(unwind-dw2.o) private external definition of
__Unwind_Resume in section (__TEXT,__text)
/usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2_s.o) definition of
__Unwind_Resume
ld: multiple definitions of symbol __Unwind_SetGR
ld: multiple definitions of symbol __Unwind_SetIP
/usr/lib/libcc_dynamic.a(unwind-dw2.o) private external definition of
__Unwind_SetIP in section (__TEXT,__text)
/usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2_s.o) definition of
__Unwind_SetIP
make: *** [Stepgram.so] Error 1
More information about the R-SIG-Mac
mailing list