inappropriate Mach-O under MacOS X

Kent Boortz kent@REDACTED
Wed Sep 5 22:21:09 CEST 2001


david wallin <david@REDACTED> writes:
> I'm trying to load a small driver that I wrote but I can't get it 
> working. I'm running R7B-3 under MacOS X and I keep getting this error 
> message :
> 
> {error,{open_error,"dyld: inappropriate Mach-O file"}}
> 
> What should I do to resolve this ? I have tried various flags to the 
> compiler/linker but nothing seems to do the trick.

I was rather frustrated when I tried to find out how to create the
linked in drivers. I *think* I got it working, I haven't got the OSX
machine into our daily build and test yet.

>From the erts/configure.in

                DED_LDFLAGS="-bundle -undefined suppress"
                DED_CFLAGS="$DED_CFLAGS -fno-common"

>From our test server configure script

    Darwin*)
        SHLIB_CFLAGS="-fno-common"
        SHLIB_LD="cc -bundle -undefined suppress"
        SHLIB_SUFFIX=".so"
        ;;

I don't remember exactly but I think I failed to link with "ld"
and use "cc" to link. 

kent



More information about the erlang-questions mailing list