* Custom linking with MacOSX frameworks?
@ 2006-10-03 11:10 Julien Blond
2006-10-03 14:02 ` [Caml-list] " Christophe Raffalli
0 siblings, 1 reply; 9+ messages in thread
From: Julien Blond @ 2006-10-03 11:10 UTC (permalink / raw)
To: caml-list
Hello,
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Custom linking with MacOSX frameworks?
2006-10-03 11:10 Custom linking with MacOSX frameworks? Julien Blond
@ 2006-10-03 14:02 ` Christophe Raffalli
2006-10-03 15:05 ` Julien Blond
0 siblings, 1 reply; 9+ messages in thread
From: Christophe Raffalli @ 2006-10-03 14:02 UTC (permalink / raw)
To: Julien Blond; +Cc: caml-list
Julien Blond a écrit :
> Hello,
>
> 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?
>
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: Christophe.Raffalli@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
---------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Custom linking with MacOSX frameworks?
2006-10-03 14:02 ` [Caml-list] " Christophe Raffalli
@ 2006-10-03 15:05 ` Julien Blond
2006-10-03 19:47 ` Christophe Raffalli
0 siblings, 1 reply; 9+ messages in thread
From: Julien Blond @ 2006-10-03 15:05 UTC (permalink / raw)
To: Christophe Raffalli; +Cc: caml-list
> I do that for GlSurf and I use Glut !
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Custom linking with MacOSX frameworks?
2006-10-03 15:05 ` Julien Blond
@ 2006-10-03 19:47 ` Christophe Raffalli
2006-10-03 20:18 ` Shivkumar Chandrasekaran
2006-10-03 22:35 ` Daniel Bünzli
0 siblings, 2 replies; 9+ messages in thread
From: Christophe Raffalli @ 2006-10-03 19:47 UTC (permalink / raw)
To: Julien Blond; +Cc: caml-list
Julien Blond a écrit :
>> I do that for GlSurf and I use Glut !
>
> 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! :-)
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 ...
>> 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?
>
Which binding ? I might give it a try ? By customizable, you mean access
to the OS X menu bar ?
> -- Julien Blond
> LIP6/Bertin Technologies
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Custom linking with MacOSX frameworks?
2006-10-03 19:47 ` Christophe Raffalli
@ 2006-10-03 20:18 ` Shivkumar Chandrasekaran
2006-10-03 22:35 ` Daniel Bünzli
1 sibling, 0 replies; 9+ messages in thread
From: Shivkumar Chandrasekaran @ 2006-10-03 20:18 UTC (permalink / raw)
To: Christophe Raffalli; +Cc: Julien Blond, caml-list
On Oct 3, 2006, at 12:47 PM, Christophe Raffalli wrote:
> 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 ...
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 ?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Custom linking with MacOSX frameworks?
2006-10-03 19:47 ` Christophe Raffalli
2006-10-03 20:18 ` Shivkumar Chandrasekaran
@ 2006-10-03 22:35 ` Daniel Bünzli
2006-10-04 16:33 ` Doug Kirk
1 sibling, 1 reply; 9+ messages in thread
From: Daniel Bünzli @ 2006-10-03 22:35 UTC (permalink / raw)
To: Christophe Raffalli; +Cc: Julien Blond, caml-list
Le 3 oct. 06 à 21:47, Christophe Raffalli a écrit :
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Custom linking with MacOSX frameworks?
2006-10-03 22:35 ` Daniel Bünzli
@ 2006-10-04 16:33 ` Doug Kirk
2006-10-04 17:28 ` Daniel Bünzli
0 siblings, 1 reply; 9+ messages in thread
From: Doug Kirk @ 2006-10-04 16:33 UTC (permalink / raw)
To: Daniel Bünzli; +Cc: Christophe Raffalli, caml-list, Julien Blond
[-- Attachment #1: Type: text/plain, Size: 419 bytes --]
Try checking
/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?
On 10/3/06, Daniel Bünzli <daniel.buenzli@epfl.ch> wrote:
>
> But header files are not included
>
[-- Attachment #2: Type: text/html, Size: 728 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Custom linking with MacOSX frameworks?
2006-10-04 16:33 ` Doug Kirk
@ 2006-10-04 17:28 ` Daniel Bünzli
2006-10-04 19:49 ` Christophe Raffalli
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Bünzli @ 2006-10-04 17:28 UTC (permalink / raw)
To: Doug Kirk; +Cc: Christophe Raffalli, caml-list
Le 4 oct. 06 à 18:33, Doug Kirk a écrit :
> 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\x13 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,
Daniel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] Custom linking with MacOSX frameworks?
2006-10-04 17:28 ` Daniel Bünzli
@ 2006-10-04 19:49 ` Christophe Raffalli
0 siblings, 0 replies; 9+ messages in thread
From: Christophe Raffalli @ 2006-10-04 19:49 UTC (permalink / raw)
To: Daniel Bünzli; +Cc: Doug Kirk, caml-list
Daniel Bünzli a écrit :
> Le 4 oct. 06 à 18:33, Doug Kirk a écrit :
>
>> 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\x13 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.
>
You can an applescript OS X application with the library and the
executable inside the app folder ... This is basically the same anyway.
> Best,
>
> Daniel
>
>
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-10-04 20:53 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-03 11:10 Custom linking with MacOSX frameworks? Julien Blond
2006-10-03 14:02 ` [Caml-list] " Christophe Raffalli
2006-10-03 15:05 ` Julien Blond
2006-10-03 19:47 ` Christophe Raffalli
2006-10-03 20:18 ` Shivkumar Chandrasekaran
2006-10-03 22:35 ` Daniel Bünzli
2006-10-04 16:33 ` Doug Kirk
2006-10-04 17:28 ` Daniel Bünzli
2006-10-04 19:49 ` Christophe Raffalli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox