Is it possible to make a custom executable linked with some MacOSX
framework like Cocoa or AppKit? If it is, how can it be done?
Thanks,
-- Julien
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
I do that for GlSurf and I use Glut ! The window has an acqua look, but no way to customize the
menubar ...
> Thanks,
>
> -- Julien
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
--
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex
tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christoph...@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------
Cool! I took a look at your Makefile and I found the answer to my
question.
Actually I didn't think to pass the -framework <name> with the double
quotes to the C compiler.
So, if this compilation issue does interest somebody, here is the
"trick". To "custom link" with MacOSX frameworks, the compilation
command must looks like :
ocamlc -custom <files needed> -o <executable name> -cclib -lobjc -
ccopt "-framework <name>" ...
Thanks to Cristophe! :-)
> The window has an acqua look, but no way to customize the menubar ...
Well, I don't use Glut for I prefer the more "customizable" SDL
framework. It may work better with it?
-- Julien Blond
LIP6/Bertin Technologies
On my machine the Mac image libraries seem to be at:
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/
Frameworks/ImageIO.framework/Versions/A/Resources/
I can see TIFF, PNG, JPEG and GIF libraries in there.
--shiv--
PS: I am not sure which framework you want to specify though: ImageIO ?
> By the way if someone know which framework to use to compile
> camlimages with the maximum number of file format without depending
> upon fink library ...
There is the ImageIO.framework.
> cd /System/Library/Frameworks/ApplicationServices.framework/
Frameworks/ImageIO.framework/Resources/
> ls *.dylib
libGIF.dylib* libJPEG.dylib*
libPng.dylib* libRaw.dylib*
libJP2.dylib* libOpenEXR.dylib*
libRadiance.dylib* libTIFF.dylib*
But header files are not included (these libraries are used to
implement an osx specific abstraction). Moreover, by looking at the
output of
> otool -T -v *.dylib
it seems to me that not every symbol defined by these libraries are
exported.
>> Well, I don't use Glut for I prefer the more "customizable" SDL
>> framework. It may work better with it?
> Which binding ? I might give it a try ? By customizable, you mean
> access to the OS X menu bar ?
ocamlsdl I guess. IIRC you don't have access to the menu bar in SDL
apps. But you don't have inversion of control -- you own the main
loop -- maybe that's what he meant by more "customizable". Compared
to glut, a limitation you get is that you can have only one window to
render (this limitation will be lifted in the upcoming version 1.3).
Daniel
/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/Image*.h
for the headers.
If you don't want to depend upon fink, and neither on OS X core libraries,
maybe ImageMagick?
> Try checking
>
> /System/Library/Frameworks/ApplicationServices.framework/Headers/
> ApplicationServices.h
> /System/Library/Frameworks/ApplicationServices.framework/Frameworks/
> ImageIO.framework/Headers/Image*.h
>
> for the headers.
These headers are those of the osx specific image loading
abstraction. Camlimages doesn't use this abstraction so there is no
chance you'll be able to compile camlimages using these headers. What
you want is png.h, jpeglib.h, tiff.h, etc. Anyway as I told in my
previous email it seems that the dynamic libraries in imageio do not
include all the functions you get when you compile the corresponding
library by yourself, so they aren't really usefull by their own.
> If you don't want to depend upon fink, and neither on OS X core
> libraries, maybe ImageMagick?
Doesn't really make more sense. First you can use libpng without
depending on fink, then iirc camlimage doesn't use ImageMagic at all.
The only real option in my opinion is to statically link against the
image libraries to distribute your application.
Best,