Re: calling C from IDL under OS X [message #33145] |
Mon, 09 December 2002 08:20 |
Ed Wright
Messages: 39 Registered: February 1999
|
Member |
|
|
in article bc31c488.0212070708.6eb2efbd@posting.google.com, Sascha Kempf at
Sascha.Kempf@mpi-hd.mpg.de wrote on 12/7/02 7:08 AM:
> Hi,
>
> does anybody know how to compile a DLM under OS X? I haven't found
> any hint how to setup the compiler/loader correctly in the RSI docs.
> There is no example Makefile for OS X in the idl/external folder. The
> standard Linux Makefile does not work.
>
> Thanks, Sascha.
I use,
#
# Compile, one for each .c file.
#
cc -fPIC -no-cpp-precomp -dynamic -fno-common \
-I/usr/local/rsi/idl_5.6/external \
-I..any other needed include paths \
-ansi -Wall -Wtraditional -Wundef \
-Wpointer-arith \
-Wcast-align -Wsign-compare \
-c -D_REENTRANT source_file.c \
-o source_file.o
#
# Link to the .so.
#
cc -bundle -flat_namespace -undefined suppress \
-o source_file.so source_file.o \
any_additional_objects.o \
any_additional_libs.a
|
|
|
Re: calling C from IDL under OS X [message #33163 is a reply to message #33145] |
Sat, 07 December 2002 11:21  |
Randall Skelton
Messages: 169 Registered: October 2000
|
Senior Member |
|
|
I dug around in the Apple docs a while ago and settled on something
like:
cc -O2 -Wall -fPIC -I/usr/local/rsi/idl/external -c -o myfile.o myfile.c
cc -shared -flat_namespace -undefined suppress -bundle -o mylib.so myfile.o
Cheers,
Randall
On 7 Dec 2002, Sascha Kempf wrote:
> Hi,
>
> does anybody know how to compile a DLM under OS X? I haven't found
> any hint how to setup the compiler/loader correctly in the RSI docs.
> There is no example Makefile for OS X in the idl/external folder. The
> standard Linux Makefile does not work.
>
> Thanks, Sascha.
>
|
|
|