Trying to compile x64 app on linux with mono gives PE32Plus error?
the full error is
Error CS8088: Your .NET Runtime does not support `PE32Plus'. Please use the latest Mono runtime instead. (CS8088) (test)
this is on a x86_64 linux system with mono and monodevelop installed as x86_64. This happens with any application I try to compile as x64 including an empty test program.
I have mono 2.6.7 install and monodevelop 2.4.3, Can anybody out there provide insights.
from what I can tell PE32Plus is a filetype for 64bit applications but m开发者_StackOverflowono's website says they support x64 environments
Managed applications are run via 'mono myApp.exe' on Linux. The version of 'mono' specified determines whether the app is 64-bit or 32-bit. If you use a 32-bit mono runtime, the managed application will be run in 32-bit mode. If you use a 64-bit mono runtime, the managed application will be run in 64-bit mode. Windows supports launching a managed executable directly via OS support, and uses the platform information to determine whether to launch the managed code as 32 or 64 bit.
So, platform information only matters on Windows with .Net. Mono ignores this information. I believe the most recent mono's support compiling with the x64 platform switch. If not, it's fine to compile it as x86 and run it with a 64-bit mono runtime.
I recently asked the same on mono's IRC channel and it seems that it's not supported.
Specifically, I was told not to use "-platform:x64" because not only the runtime ignores it but the SRE (System.Reflection.Emit) implementation doesn't know how to emit PE32+ binaries.
精彩评论