[Mono-dev] Embedding mono on windows: the missing (lib)mono.lib
robertj at gmx.net
Tue Aug 21 04:30:43 EDT 2007
Sebastian Good wrote:
> I am attempting to embed a mono runtime in my C++ application. I'm using
> the standard 1.4.2 mono install (on WinXP) & Visual Studio 2005. I've
> generated the expected C++ compiler flags using
> pkg-config --msvc-syntax --cflags --libs mono
> And while my simple hello-world embedding application now compiles
> nicely, it fails to link with
> LNK1104: cannot open file 'mono.lib'
> I can confirm my install has no 'mono.lib', or even 'libmono.lib'. A
> search of this list and other sites suggests this is not all that
> uncommon. People seem to be trying to build mono using Cygwin in order
> to recreate the missing mono.lib (and sometimes running into other
> problems doing that). Am I being a knucklehead or is the standard mono
> Windows install missing this library? Is there an alternative to
> building mono myself? Should I be more interested in the '*.a' files
> sitting in my /lib directory?
mono.def (see attachment) is built during the cygwin
build process. From this file, you can generate mono.lib
using MSVC's lib tool:
lib /nologo /machine:x86 /def:mono.def /out:mono.lib
Because the embedded API is stable, i.e. doesn't change often,
you can use the lib with several Mono versions.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Mono-devel-list