Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ocamlmklib in mingw
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dmitry Bely <dbely@m...>
Subject: Re: [Caml-list] ocamlmklib in mingw
"SooHyoung Oh" <shoh@duonix.com> writes:

>> Correct: ocamlmklib is only available under Unix (and Cygwin), but not
>> for the native Win32 port of OCaml.
>>
>> The reason is as follows: ocamlmklib builds both a DLL and a static
>> library from a common set of C object files.  This works fine under
>> Unix because (with the right compilation options) the same object
>> files can be used in both DLL and static contexts.  But this isn't so
>> under Windows: object files for a DLL need to be compiled with
>> different, incompatible flags than object files for a static library.
>
> How about ocamlmklib on win32/mingw?

Currently it's also not possible because MinGW/MSVC builds use the same
makefiles. But I believe both can be fixed because the sentense

>>>object files for a DLL need to be compiled with
>> different, incompatible flags than object files for a static library.

seems to be not very correct (it is possible to built both static and
dynamic Win32 library from the same objects files, although with some
linker warnings. Of course, some modifications to sources/makefiles are
required).

- Dmitry Bely


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners