Version française
Home     About     Download     Resources     Contact us    
Browse thread
binding, compilation on mac os
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Olivier Andrieu <oandrieu@n...>
Subject: Re: [Caml-list] binding, compilation on mac os
On Feb 17, 2008 7:20 PM, Florent Monnier
<fmonnier@linux-nantes.fr.eu.org> wrote:
> Hi,
> someone is trying to compile one of my binding on Mac OS, and reported me some
> problems, the main one is this error with this command:
>
> ocamlopt allegro.cmxa exhello.ml -o exhello
>
> <snip>
> /usr/bin/ld: Undefined symbols:
> .objc_class_name_NSApplication
> .objc_class_name_NSAutoreleasePool
> .objc_class_name_NSBundle
> .objc_class_name_NSConstantString
> .objc_class_name_NSFileManager
> .objc_class_name_NSMenu
> .objc_class_name_NSMenuItem
> .objc_class_name_NSObject
> .objc_class_name_NSProcessInfo
> .objc_class_name_NSThread
> _CFDictionaryGetValue
> _CFNumberGetValue
> _CGDisplayCurrentMode
> _CGDisplaySetPalette
> _CGMainDisplayID
> _FSGetCatalogInfo
> _GetProcessBundleLocation
> _NSApp
> __NSConstantStringClassReference
> ___CFStringMakeConstantString
> __mangled_main_address
> _objc_msgSend
> _caml_atom_table
> _caml_static_data_end
> _caml_static_data_start
> _caml_code_area_end
> _caml_code_area_start
> collect2: ld returned 1 exit status
> Error during linking
> </snip>
>
>
> here is the Makefile of the binding:
> http://www.linux-nantes.fr.eu.org/~fmonnier/OCaml/Allegro/Makefile
>
> Does someone have an idea about this problem ?

Here's the problem I think:

alleg-wrap.o: alleg-wrap.c
	ocamlc -c -cc "gcc -o $@" $<

OCaml was probably compiled with a different C compiler. Try removing
the -cc option.

-- 
  Olivier