In what cases does Xamarin support 64-bit code creation for Mac Apps?

TerryReeseTerryReese USMember ✭✭

I had picked up a Xamarin.Mac Indie license to recode a .net app for folks working on Mac systems and support the great work Xamarin is doing for the .NET community. The tools have generally been great -- but I definitely have a question. I had assumed since I had set in the Mac Build options that I was targeting 64 bit systems that the executable would be created targeting that framework. However, when I run my test code checking to see if the process is 64 bit or not (i.e., checking the IntPtr.Size) -- its still reporting back as being 32-bit. This is problematic since I eventually need to link to some libraries that are only available as 64-bit (I could recompile them, but I'd rather avoid creating a special derivative for my project).

I guess what I'm wondering -- In my project options, I the Mac Build to target x86_64 architectures, but the target framework that I have to build against is the Mono/.Net 4.5 framework. I'd like to build against the Xamarin.Mac .Net 4.5 Framework but apparently the IKVM package that I need to use to enable Saxon.Net within my app uses components that require the Xamarin Business license (which if I sold this program, I'd get in a heartbeat -- I've had nothing but great experiences working with the Xamarin tools -- but I work as a faculty member at a research library and this is a software project that I give away as part of my service to the community so the current license model is definitely a little too rich for my blood). So, I'm wondering if my problem is the framework I'm compiling against or if its something else (like the IntPtr.Size isn't a good option for checking if the process is 64bit)?

Thanks,

--tr

Posts

  • TerryReeseTerryReese USMember ✭✭

    Re-reading this -- I should also say -- I've been using the tools since April and they really are fantastic. Honestly, if it wasn't for the fact that I have to link to some external libraries -- this wouldn't even be something I would have even thought about (I would have assumed everything was working as 64-bit and gone on happily since everything has been working swimmingly). I've been really pleasantly surprised by how easy working with the Studio and porting the code has been.

    -tr

  • DanSmith.1531DanSmith.1531 USMember ✭✭

    Is your Xamarin.Mac application using the "Unified" profile, or the "Classic"? If it as "Classic" app, then it can't be compiled as a 64 bit application.

    You can test your application to see if it is running in 64-bit mode by opening up the "Activity Monitor" application, switch to the "Disk" tab, and see if your application shows "64-bit" in the "Kind" tab.

  • TimothyRisiXMTimothyRisiXM USXamarin Team Xamurai

    Hi Terry,

    The reason you have been unable to build as 64-bit is because you are using the Mono/.Net 4.5 framework. That framework uses the system mono, which is currently 32-bit only. The Unified Mobile and .NET 4.5 frameworks are both able to build 64-bit applications.

  • TerryReeseTerryReese USMember ✭✭

    I had thought the fact that I've been stuck using the Mono/.Net 4.5 framework might be the problem. That's a bit of a bummer since this appears to be my only build avenue for now.

    Thanks,

    --tr

Sign In or Register to comment.