[Mono-dev] Mono.lib on Windows

Jonathan Chambers joncham at gmail.com
Fri May 30 21:38:46 EDT 2008


Hello,

    Attached is a patch that makes the create-windef.pl script run on
Windows. We can run this as a post build step on Windows to produce the def
file, and then run Robert's lib.exe step to produce a library that people
can link against. Note that this last step requires access to Windows SDK
tools on the build machine. I have no perl skills, so if my few changes can
be improved, please do.

Contributed under MIT/X11 license.

Thanks,
Jonathan

On Fri, May 30, 2008 at 9:18 PM, Geoff Norton <gnorton at novell.com> wrote:

> If this is the case we shouldn't be shipping the .a at all, as its
> fundamentally useless.
>
> Has anyone ever looked at getting boehm to run on windows without
> DllMain (*I assume this is what is needs/expects.  I didn't look at it
> yet)
>
> -g
>
> On Sat, 2008-05-31 at 02:50 +0200, Robert Jordan wrote:
> > Hi guys,
> >
> > libmono.a is a static lib. As such, it's not suitable for embedding,
> > regardless of the compiler: The GC on Win32 expects to be run
> > from a dll. The sample below would crash if it would actually try
> > more than this simple function.
> >
> > libmono.dll.a is the correct library to link against *when using
> > cygwin*, but for some reasons, this lib is not suitable for MSVC.
> > I've already STFW but I was not able to find the reason of this.
> >
> > The only way that works seems to be MS' lib tool:
> >
> > lib /nologo /machine:x86 /def:mono.def /out:mono.lib
> >
> > Robert
> >
> > Wade Berrier wrote:
> > > Wow, libmono.a is 64MB, 15 MB compressed... :(  Um, maybe we could have
> > > a win32 embedded Wiki page that describes this rather than ship 2 files
> > > of that size in the installer?
> > >
> > > Ideas or recommendations?
> > >
> > > Wade
> > >
> > > On Fri, 2008-05-30 at 18:23 -0600, Wade Berrier wrote:
> > >> Just to be sure, this was using MSVC, correct?
> > >>
> > >> I'll Update the script to make a copy of libmono.a -> mono.lib.
> > >>
> > >> Thanks for trying this out and reporting!
> > >>
> > >> Wade
> > >>
> > >> On Fri, 2008-05-30 at 19:39 -0400, Bill Holmes wrote:
> > >>> Wade,
> > >>>
> > >>> I finally got around to testing using libmono.a as the library to
> link
> > >>> on Windows and it work fine for me.
> > >>>
> > >>> I did a simple test to call the first symbol I found in the include
> > >>> directory.  (See below.)  I guess that is enough proof of concept.
> > >>>
> > >>> So the answer to you questoin on Thursday to use libmono.dll.a or
> > >>> libmono.a, the answer is libmono.a.
> > >>>
> > >>> -bill
> > >>>
> > >>> #include "stdafx.h"
> > >>> extern "C"
> > >>> {
> > >>>   #include "mono-path.h"
> > >>> }
> > >>>
> > >>> int _tmain(int argc, _TCHAR* argv[])
> > >>> {
> > >>>   mono_path_resolve_symlinks ("");
> > >>>
> > >>>   return 0;
> > >>> }
> > >>>
> > >>>
> ------------------------------------------------------------------------
> > >>>
> > >>> _______________________________________________
> > >>> Mono-devel-list mailing list
> > >>> Mono-devel-list at lists.ximian.com
> > >>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080530/c72edf9b/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: create-windef.diff
Type: application/octet-stream
Size: 1198 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080530/c72edf9b/attachment.obj 


More information about the Mono-devel-list mailing list