From simon.urbanek at r-project.org  Tue Nov  6 14:35:04 2007
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Tue, 6 Nov 2007 08:35:04 -0500
Subject: [Rd] Mac OS X Leopard and C compiling
In-Reply-To: <8fa142710711051718y66889080u8dc4e6ce61e2d64f@mail.gmail.com>
References: <8fa142710711051710g5d6221e5i1b1e4b593230fdb9@mail.gmail.com>
	<8fa142710711051718y66889080u8dc4e6ce61e2d64f@mail.gmail.com>
Message-ID: <F29BF2F1-10E2-4686-A09F-4754C2114472@r-project.org>

Daniel,

please read R-SIG-Mac, it has all the details on Leopard support.  
There are several different fixes for this, possibly the easiest for  
you:
PKG_LIBS="-mmacosx-version-min=10.4" R CMD SHLIB ...

Cheers,
Simon

On Nov 5, 2007, at 8:18 PM, Daniel McDonald wrote:

> I recently bought a new Intel Mac with OSX Leopard. I reinstalled the
> latest version of R and the Xcode tools. I'm trying to compile a C
> source code with the R compiler in X11, and I receive the following
> error message:
>
> [Macintosh:School Work 07-08/36-711/HW 3] dajmcdon% R CMD SHLIB  
> McDonaldHW3.c
> gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
> -std=gnu99 -no-cpp-precomp
> -I/Library/Frameworks/R.framework/Resources/include
> -I/Library/Frameworks/R.framework/Resources/include/i386  -msse3
> -fPIC  -g -O2 -march=nocona -c McDonaldHW3.c -o McDonaldHW3.o
> gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
> -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names
> -Wl,-macosx_version_min -Wl,10.3 -undefined dynamic_lookup
> -single_module -multiply_defined suppress -L/usr/local/lib -o
> McDonaldHW3.so McDonaldHW3.o   -F/Library/Frameworks/R.framework/..
> -framework R
> ld: library not found for -ldylib1.10.5.o
> collect2: ld returned 1 exit status
> make: *** [McDonaldHW3.so] Error 1
>
> McDonaldHW3.c is the code I am trying to compile. It works fine on my
> old machine but not on the new one. Any ideas?
>
> Thanks,
> Daniel
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



[Rd] Mac OS X Leopard and C compiling
Simon Urbanek