Question

I have a .Net program, which works fine using "mono Program.exe", but now I am trying to use "mkbundle -o prog Program.exe --deps" on the SAME machine, and it returns the following error:

/usr/bin/ld: skipping incompatible /opt/novell/mono/lib/pkgconfig/../../lib/libmono-2.0.so when searching for -lmono-2.0 /usr/bin/ld: skipping incompatible /opt/novell/mono/lib/pkgconfig/../../lib/libmono-2.0.a when searching for -lmono-2.0 /usr/bin/ld: cannot find -lmono-2.0 collect2: ld returned 1 exit status

The system is CentOS 5.7 on x86_64. I have installed mono on this system using these instructions. Does anyone know why mono works, but mkbundle doesn't? How can I fix it?

Was it helpful?

Solution

You likely installed the 32bit version of mono (which works on x86_64 systems like yours), but mkbundle will try to compile with the default compiler settings (which are 64bit) and only find the 32 bit version of the library. To solve the issue you have either to install the 64 bit version of mono to match your system or (assuming you install also the rest of the needed 32 bit libraries, like libc and compilers) compile with mkbundle in 32 bit mode, by adding the -m32 option to the compiler command line that mkbundle prints on the console (you'll also need to use the -c option to mkbundle).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top