[Mono-osx] [ANN] mcocoa 0.7 and mobjc 0.8

Lee V. Andrus landrus2 at by-rite.net
Fri Jan 8 17:16:40 EST 2010

Jesse Jones-2 wrote:
> On Jan 5, 2010, at 2:48 PM, Lee V. Andrus wrote:
>> I downloaded these and tried to build mobjc.  I got an error message
>> indicating that something in the Mono framework was out of date.  I
>> downloaded and installed the latest Mono framework and tried again.  I
>> got
>> this error message (which may be the same as the 1st):
> I'm running mono 2.6.1 as well. I just downloaded mobj from the web site
> executed `make` and it built fine.
>> [mono] /usr/local/source/mobjc- @ make
>> gmcs -out:bin/tests.dll -checked+ -debug+ -warn:4 -warnaserror+ -d:DEBUG
>> -d:TRACE -d:CONTRACTS_FULL -nowarn:1591	 -pkg:mono-nunit -r:bin/mobjc.dll
>> -target:library test/*.cs
> This is a little weird: it should have generated keys and built mobjc.dll
> before trying to build the tests.dll. I would try doing a `make distclean`
> and then `make` since you have re-installed mono.
Looking into your makefile, I found that the dependencies of some targets
(including "all") are backwards.  Although dependencies and/or rules between
such dependent targets usually force them to be built in the correct
sequence, it may be prudent to list multiple dependencies of a target in the
sequence you would prefer or expect them to be built.

>> dyld: Library not loaded:
>> /Library/Frameworks/Mono.framework/Versions/2.6.1/lib/libgthread-2.0.0.dylib
>>  Referenced from:
>> /Library/Frameworks/Mono.framework/Versions/2.6.1/bin/mono
>>  Reason: Incompatible library version: mono requires version 2106.0.0 or
>> later, but libgthread-2.0.0.dylib provides version 2001.0.0
>> make: *** [bin/tests.dll] Trace/BPT trap
>> It looks like the gthread library packaged with Mono is not new enough
>> for
>> the mono executable in the same framework.
> I've never seen this and am not sure what to tell you if it persists, but
> it sounds like you were able to build the mobjc.dll at least once so maybe
> the problem is with nunit.
Actually, there may have been some conflict with Mono 2.7, which I
downloaded from the SVN, built, and installed in "/usr/local/".  Prepending
"/usr/local/bin" to my PATH cleared up that problem.

I also had to delete some hand-written enums and methods from MCocoa 0.7 to
make it compatible with OS X 10.5, which I am running.

On another note, I noticed that there are still no wrappers classes or
interfaces for Objective C Protocols, although their methods are wrapped in
each class that "conforms to" them.  Methods in Category
NSDraggingDestination each have a parameter of type "id <NSDraggingInfo>". 
Since no class that conforms to that Protocol is exposed in the framework
header files, nothing about it is generated by your generator.  I will
probably need to create my own set of extension methods to handle this.

As for the future development of MObjC/MCocoa, my vote would be for
enhancing the automatic generation to handle variadic methods, methods with
function pointer or block parameters, and wrappers for Protocols; and some
form of build switch to target a specific OS X version.  Work you put into
the generator is work you will not need to put into hand-written code
several times over.
View this message in context: http://old.nabble.com/-ANN--mcocoa-0.7-and-mobjc-0.8-tp26964532p27083166.html
Sent from the Mono - OSX mailing list archive at Nabble.com.

More information about the Mono-osx mailing list