bmac don't support 64bit yet ?

Hello everyone,
We upgraded the Xanarin Studio and converted our project to support 64bit. Now in my project I need not to add “using MonoMac.Foundation;” I can directly use “using Foundation;” the second thing I have done is I have used the new datatypes like “System.nuint” or “nuint" in project and everything looks fine in project.

But when I try to convert a third party library “OSXFuse” to use this new updated things, the “bmac” is not able to generate dll for me.

    1.) When I try to use

using Foundation;

        I get error like  

ApiDefinition.cs(3,7): error CS0246: The type or namespace name `Foundation' could not be found. Are you missing an assembly reference?

    2.) When I try to use “nuint” Like bellow 
  [Export ("readFileAtPath:userData:buffer:size:offset:error:")]

int ReadFileAtPath (string path, NSObject userData,[PlainString] string buffer, nuint size, Int64 offset, out NSError error);

     I get error like 

ApiDefinition.cs(183,83): error CS0246: The type or namespace name `nuint' could not be found. Are you missing an assembly reference?

I am not sure what the issue is. I think the Xamarin Studio is now supporting the 64bit but the “bmac” don’t support it yet. If this is the case please guide me how to create dll for “OSXFuse” framework that support 64bit.

    I am using bmac command to create dll like this :

$ /Library/Frameworks/Xamarin.Mac.framework/Versions/1.10.0.13/bin/bmac -oOSXFuse_Sep.dll -tmpdir=/tmp -baselib=/Library/Frameworks/Xamarin.Mac.framework/Versions/1.10.0.13/lib/mono/XamMac.dll -r=System.Drawing ApiDefinition.cs -s=StructsAndEnums.cs --compiler=mcs

Any help ?

vishnu sharma

Posts

  • RolfBjarneKvingeRolfBjarneKvinge USXamarin Team Xamurai

    Try passing --new-style to bmac as well.

  • No luck

    ishnus-MacBook-Air:OSXFuse_Sept vishnu$ /Library/Frameworks/Xamarin.Mac.framework/Versions/1.10.0.13/bin/bmac -oOSXFuse_Sep.dll -tmpdir=/tmp -baselib=/Library/Frameworks/Xamarin.Mac.framework/Versions/1.10.0.13/lib/mono/XamMac.dll -r=System.Drawing ApiDefinition.cs -s=StructsAndEnums.cs --compiler=mcs --new-style

    ApiDefinition.cs(3,7): error CS0246: The type or namespace name `Foundation' could not be found. Are you missing an assembly reference?

  • RolfBjarneKvingeRolfBjarneKvinge USXamarin Team Xamurai

    Also try removing the -baselib option (or if that fails, point it to Xamarin.Mac.dll instead of XamMac.dll)

  •     This time something different.
    

    Vishnus-MacBook-Air:OSXFuse_Sept vishnu$ /Library/Frameworks/Xamarin.Mac.framework/Versions/1.10.0.13/bin/bmac -oOSXFuse_Sep.dll -tmpdir=/tmp -baselib=/Library/Frameworks/Xamarin.Mac.framework/Versions/1.10.0.13/lib/mono/Xamarin.Mac/Xamarin.Mac.dll -r=System.Drawing ApiDefinition.cs -s=StructsAndEnums.cs --compiler=mcs --new-style

    /tmp/ObjCRuntime/Libraries.g.cs(31,67): error CS0117: ObjCRuntime.Constants' does not contain a definition forOSXFUSELibrary'

  • And If I don't use the "-baselib" then I get "MonoMac.dll" not found error.

    Vishnus-MacBook-Air:OSXFuse_Sept vishnu$ /Library/Frameworks/Xamarin.Mac.framework/Versions/1.10.0.13/bin/bmac -oOSXFuse_Sep.dll -tmpdir=/tmp -r=System.Drawing ApiDefinition.cs -s=StructsAndEnums.cs --compiler=mcs --new-style

    error CS0006: Metadata file `MonoMac.dll' could not be found
    Compilation failed: 1 error(s), 0 warnings

  • RolfBjarneKvingeRolfBjarneKvinge USXamarin Team Xamurai

    Can you show us your ApiDefinition.cs? It looks like seomthing is wrong there (because of the ObjCRuntime.Constants' does not contain a definition forOSXFUSELibrary' error).

  • Ok my API definition file, StructsAndEnums is attached

  • RolfBjarneKvingeRolfBjarneKvinge USXamarin Team Xamurai

    Your [Field] attributes need to pass "__Internal" as the second argument (some of them do, but not all):

        [Field ("kGMUserFileSystemErrorDomain", "__Internal")]
    
  • You are right, It worked. Now I have dll in at location. :)

Sign In or Register to comment.