开发者

skipping incompatible library (lmono) while cross compiling c with mono

开发者 https://www.devze.com 2023-01-27 09:29 出处:网络
Ok for now i managed to call managed code (mono) from native C code referring to: http://www.mono-project.com/Embedding_Mono

Ok for now i managed to call managed code (mono) from native C code referring to: http://www.mono-project.com/Embedding_Mono which works on my host system (x86) ubuntu. Now i try to crosscompile it for my target (arm) debian system.

Crosscompiler is arm-none-linux-gnueabi-gcc 2010 from Codesourcery

when i go for:

arm-none-linux-gnueabi-gcc 'pkg-config --cflags glib-2.0 --libs mono'开发者_Go百科 -o main.o main.c

i get

Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lmono

so the libmono.so , libmono.a was found in /usr/lib and i go for:

arm-none-linux-gnueabi-gcc -L/usr/lib 'pkg-config --cflags glib-2.0 --libs mono' -o main.o main.c

which results in:

/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/libmono.so when searching for -lmono

/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/libmono.a when searching for -lmono

/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lmono

somebody has advice?

best regards Gobliins


Build libmono for ARM first, instead of trying to use your x86 build.

0

精彩评论

暂无评论...
验证码 换一张
取 消