Re: Custom linking for MinGW gives unwanted dependency on cygwin1.dll
Mike Spivey <[email protected]> Sun, 04 Jan 2009 13:23:44 +0000
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Message-ID | <[email protected]> |
Alain Frisch confirms this as a problem that can be removed with a slight adjustment to the library search order in FlexDLL. It will be solved in the next release of OCaml. -- Mike Mike Spivey wrote: > I'm using the MinGW port of OCaml under Cygwin and trying to build a > self-contained native windows application that uses lablgtk2. What I > find is that linking with 'ocamlc -custom' results in an executable that > depends on cygwin1.dll. Further investigation reveals that cygwin1.dll > is being used for some math functions, and that adding '-ccopt > -L/lib/mingw' solves the problem. > > For example, in the /examples directory of lablgtk2, try > > ocamlc -custom -o about.exe -I ../src lablgtk2.cma about.ml > cygcheck ./about.exe > > and see the dependency on cygwin1.dll. Then try > > ocamlc -custom -o about.exe -I ../src lablgtk2.cma about.ml \ > -ccopt -L/lib/mingw > cygcheck ./about.exe > > and the dependency is gone. It must have something to do with the way > flexdll searches for libraries; other OCaml programs that don't use GTK > find the MinGW math library without problem. > > I don't call this a bug, but it is something that it is useful to know > about. > > Best wishes for 2009, > > -- Mike > > _______________________________________________ > Lablgtk mailing list > [email protected] > http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk