开发者

MissingMethodException after upgrading to Monotouch 4.0

开发者 https://www.devze.com 2023-02-23 08:07 出处:网络
Does anyone use the excellent Sparrow 2D monotouch library? https://github.com/trustme/Sparrow I just updated to Monotouch 4.0 and Monodevelop 2.4.2, and when

Does anyone use the excellent Sparrow 2D monotouch library?

https://github.com/trustme/Sparrow

I just updated to Monotouch 4.0 and Monodevelop 2.4.2, and when rebuilt and run开发者_运维问答 SparrowTest gives me this strange error:

System.MissingMethodException has been thrown "Method not found:
'Monotouch.ObjCRuntime.Messaging.void_objc_msgSend_Boolean'." at
SparrowTest.AppDelegateIPhone.FinishedLaunching in
AppDelegateIPhone.cs:23

The method is:

SPStage.SupportHighResolutions = true;

When commented it gives the same error on many other methods. I've tried using different sdk versions but the problem persists.

Any clues?


You need to regenerate the sparrow.dll with btouch for MonoTouch 4.


try to create a script with -out to regenerate Third Part Libraries another way to avoid this problem, is that inm your build output of your project choose : Don't link the assemblies and your project will work


Problem solved!

With MonoTouch 4.0 we must use smcs instead of gmcs.

Here is the right procedure for generating sparrow.dll with MonoTouch 4.0, in two steps:

/Developer/MonoTouch/usr/bin/btouch sparrow.cs -s:enum.cs --outdir=gen -ns=Sparrow --unsafe --sourceonly=genfiles

/Developer/MonoTouch/usr/bin/smcs -out:sparrow.dll cat genfiles extensions.cs -unsafe -r:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll enum.cs -target:library

Thanks to Geoff Norton and Duane Wandless for the help!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号