[Mono-dev] Compiling Mono Runtime in VS2010 (Guy Sherman)

Guy Sherman guy at guysherman.com
Mon Jun 28 02:58:57 EDT 2010


Hi Folks,

I got home today and managed to get the runtime to compile in Visual Studio
2010, but still the same error, ie a failed assertion on:

_CrtIsValidHeapPointer

So, this brought a new question to mind: Am I even supposed to be calling
free on pointers that have been given to me by the mono runtime, or am I
trying to free memory out of the mono heap instead of my own?

Thanks,

Guy.

Message: 8
Date: Mon, 28 Jun 2010 12:27:36 +1200
From: Guy Sherman <guy at guysherman.com>
Subject: [Mono-dev] Compiling Mono Runtime in VS2010
To: <mono-devel-list at lists.ximian.com>
Message-ID: <56ca22795d75085506ea17ead945235a at mail2.guysherman.com>
Content-Type: text/plain; charset=UTF-8

Hi All,

I managed to compile a 64-bit version of the mono runtime, using Visual
Studio 2008, and I am having a great time working out how to embed mono.
However, I am using Visual Studio 2010 for my solution, and whenever I call
free on a pointer allocated by the runtime (like a MonoClass*), I get a
failed debug assertion which has something to do with heap corruption, and
something to do with code within the same process being from different
versions of the C runtime (2008 vs 2010 I guess).

So, my question is this: has anyone managed to compile the mono runtime in
Visual Studio 2010 yet? I tried a couple of weeks ago but couldn't, there
was some phantom syntax error, which didn't appear in Visual Studio 2008.

As an aside, when trying to call g_free, I get an unresolved externals
error despite the fact that the path to glib-2.0.lib is definitely in my
project settings. Could this be because the glib libs that ship with mono
for windows a 32-bit, and I'm trying to compile 64-bit?

Thanks very much in advance,

Guy Sherman.





More information about the Mono-devel-list mailing list