comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: dynamic linking on Mac
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: dynamic linking on Mac [message #76589 is a reply to message #76558] Fri, 10 June 2011 17:08 Go to previous message
David Grier is currently offline  David Grier
Messages: 35
Registered: July 2010
Member
Hi Mary Jo,

Try

print, !MAKE_DLL

which prints the CCFLAGS and LDFLAGS needed to build a DLL on the
present architecture.

All the best,

David

On 06/10/2011 07:01 PM, brodzik@nsidc.org wrote:
> Hi, all,
>
> Has anyone running IDL on a Mac successfully linked to a shared C
> library?
>
> I've got some code that lets me call the routines in a C library from
> IDL. It's name is call_grids.c and everything works fine on my linux
> system. I'm trying to port the whole thing from Suse linux to a Mac,
> and I'm having trouble on the linker step for call_grids.so. I've
> already compiled and tested the original C library (which is
> libmapx.a), it has some command-line programs that call it, and they
> are working fine.
>
> But for call_grids.c, in my Linux options, my makefile sets CFLAGS to -
> fPIC and C_LD_FLAGS to -shared, but I found out pretty quickly that
> Darwin's ld doesn't support "-shared". I found one helpful site on-
> line that suggested that the Darwin equivalent of '-shared' is '-
> bundle -flat_namespace -undefined suppress', but that returns this
> problem:
>
> ld -bundle -flat_namespace -undefined suppress -o call_grids.so
> call_grids.o -L/Users/mj/lib -lmapx -lm
> ld: symbol dyld_stub_binding_helper not defined (usually in crt1.o/
> dylib1.o/bundle1.o) for inferred architecture x86_64
> make[1]: *** [call_grids.so] Error 1
>
> Then I started researching these ld switches and found several
> alternatives to -bundle, including -dynamic, -dylib, -dylinker. My
> trouble is that I'm not sure what it is I should be *trying* build,
> here. Going back to the suse ld man page, it just says -shared
> "builds a shared library". Well, I guess I knew that. What I don't
> know is what that's supposed to look like on a Mac.
>
> Can anyone offer me some tips on what I should be trying to create?
>
> Thanks,
> Mary Jo
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Histrogram plot in IDL using cgHistoplot
Next Topic: Histogram with two distributions

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Jul 14 05:07:12 PDT 2026

Total time taken to generate the page: 1.75896 seconds