我已经从单声道3.12迁移到更新的单声道版本4.0.4。 http://www.mono-project.com/news/2015/05/04/mono-4-0-is-out/ 有人能指出我基于新的mono 4.0.4版本的单声道嵌入式教程吗?我尝试了我能找到的最简单的教程方法,当我想获得单字段域时,每次都会出现段错误:
project.pro
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = MonoEmbeddedMinimal
TEMPLATE = app
SOURCES += main.cpp
QMAKE_CXXFLAGS += -pthread
CONFIG += link_pkgconfig
PKGCONFIG += mono-2
PKGCONFIG += glib-2.0
单2.PC
prefix=${pcfiledir}/../..
exec_prefix=${pcfiledir}/../..
libdir=${prefix}/lib
includedir=${prefix}/include/mono-2.0
sysconfdir=/etc
Name: Mono
Description: Mono Runtime
Version: 4.0.4
Libs: -L${libdir} -lmono-2.0 -lm -lrt -ldl -lpthread
Cflags: -I${includedir} -D_REENTRANT
的main.cpp
#include <mono/jit/jit.h>
#include <mono/metadata/assembly.h>
int main(int /*argc*/, char */*argv*/[])
{
mono_config_parse (NULL);
MonoDomain *domain = mono_jit_init_version("app", "v4.0.30319");
return 0;
}
节目输出 本机堆栈跟踪:
/usr/lib/libmonoboehm-2.0.so.1(+0xd33ca) [0x7f68822413ca]
/usr/lib/libmonoboehm-2.0.so.1(+0x488e0) [0x7f68821b68e0]
/usr/lib/libpthread.so.0(+0x10d60) [0x7f687fba4d60]
/usr/lib/libmonoboehm-2.0.so.1(+0x243a40) [0x7f68823b1a40]
/usr/lib/libmonoboehm-2.0.so.1(+0x24bef8) [0x7f68823b9ef8]
/usr/lib/libmonoboehm-2.0.so.1(+0x244f3f) [0x7f68823b2f3f]
/usr/lib/libmonoboehm-2.0.so.1(+0x244308) [0x7f68823b2308]
/usr/lib/libmonoboehm-2.0.so.1(+0x23af68) [0x7f68823a8f68]
/usr/lib/libmonoboehm-2.0.so.1(+0x23b851) [0x7f68823a9851]
/usr/lib/libmonoboehm-2.0.so.1(+0x245e6a) [0x7f68823b3e6a]
/usr/lib/libmonoboehm-2.0.so.1(+0x245f8e) [0x7f68823b3f8e]
/usr/lib/libmonoboehm-2.0.so.1(+0x1fc0a1) [0x7f688236a0a1]
/usr/lib/libmonoboehm-2.0.so.1(+0x1d079c) [0x7f688233e79c]
/usr/lib/libmonoboehm-2.0.so.1(+0x48f1e) [0x7f68821b6f1e]
/data/canway/src/cw121/ASAP2Library/build-MonoEmbeddedMinimal-Desktop-Debug/MonoEmbeddedMinimal() [0x400805]
/usr/lib/libc.so.6(__libc_start_main+0xf0) [0x7f687f278610]
/data/canway/src/cw121/ASAP2Library/build-MonoEmbeddedMinimal-Desktop-Debug/MonoEmbeddedMinimal() [0x4006f9]
Debug info from gdb:
[New LWP 4935]
[New LWP 4934]
[New LWP 4933]
[New LWP 4932]
[New LWP 4931]
[New LWP 4930]
[New LWP 4929]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
0x00007f687fba49bb in waitpid () from /usr/lib/libpthread.so.0
Id Target Id Frame
8 Thread 0x7f687792b700 (LWP 4929) "MonoEmbeddedMin" 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
7 Thread 0x7f687712a700 (LWP 4930) "MonoEmbeddedMin" 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
6 Thread 0x7f6876929700 (LWP 4931) "MonoEmbeddedMin" 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
5 Thread 0x7f6876128700 (LWP 4932) "MonoEmbeddedMin" 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
4 Thread 0x7f6875927700 (LWP 4933) "MonoEmbeddedMin" 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
3 Thread 0x7f6875126700 (LWP 4934) "MonoEmbeddedMin" 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
2 Thread 0x7f6874925700 (LWP 4935) "MonoEmbeddedMin" 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
* 1 Thread 0x7f6882885840 (LWP 4928) "MonoEmbeddedMin" 0x00007f687fba49bb in waitpid () from /usr/lib/libpthread.so.0
Thread 8 (Thread 0x7f687792b700 (LWP 4929)):
#0 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x00007f68823b9577 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#2 0x00007f68823b140a in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#3 0x00007f68823b7c44 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#4 0x00007f687fb9b4a4 in start_thread () from /usr/lib/libpthread.so.0
#5 0x00007f687f34113d in clone () from /usr/lib/libc.so.6
Thread 7 (Thread 0x7f687712a700 (LWP 4930)):
#0 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x00007f68823b9577 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#2 0x00007f68823b140a in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#3 0x00007f68823b7c44 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#4 0x00007f687fb9b4a4 in start_thread () from /usr/lib/libpthread.so.0
#5 0x00007f687f34113d in clone () from /usr/lib/libc.so.6
Thread 6 (Thread 0x7f6876929700 (LWP 4931)):
#0 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x00007f68823b9577 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#2 0x00007f68823b140a in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#3 0x00007f68823b7c44 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#4 0x00007f687fb9b4a4 in start_thread () from /usr/lib/libpthread.so.0
#5 0x00007f687f34113d in clone () from /usr/lib/libc.so.6
Thread 5 (Thread 0x7f6876128700 (LWP 4932)):
#0 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x00007f68823b9577 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#2 0x00007f68823b140a in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#3 0x00007f68823b7c44 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#4 0x00007f687fb9b4a4 in start_thread () from /usr/lib/libpthread.so.0
#5 0x00007f687f34113d in clone () from /usr/lib/libc.so.6
Thread 4 (Thread 0x7f6875927700 (LWP 4933)):
#0 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x00007f68823b9577 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#2 0x00007f68823b140a in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#3 0x00007f68823b7c44 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#4 0x00007f687fb9b4a4 in start_thread () from /usr/lib/libpthread.so.0
#5 0x00007f687f34113d in clone () from /usr/lib/libc.so.6
Thread 3 (Thread 0x7f6875126700 (LWP 4934)):
#0 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x00007f68823b9577 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#2 0x00007f68823b140a in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#3 0x00007f68823b7c44 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#4 0x00007f687fb9b4a4 in start_thread () from /usr/lib/libpthread.so.0
#5 0x00007f687f34113d in clone () from /usr/lib/libc.so.6
Thread 2 (Thread 0x7f6874925700 (LWP 4935)):
#0 0x00007f687fba107f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x00007f68823b9577 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#2 0x00007f68823b140a in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#3 0x00007f68823b7c44 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#4 0x00007f687fb9b4a4 in start_thread () from /usr/lib/libpthread.so.0
#5 0x00007f687f34113d in clone () from /usr/lib/libc.so.6
Thread 1 (Thread 0x7f6882885840 (LWP 4928)):
#0 0x00007f687fba49bb in waitpid () from /usr/lib/libpthread.so.0
#1 0x00007f6882241460 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#2 0x00007f68821b68e0 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#3 <signal handler called>
#4 0x00007f68823b1a40 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#5 0x00007f68823b9ef8 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#6 0x00007f68823b2f3f in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#7 0x00007f68823b2308 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#8 0x00007f68823a8f68 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#9 0x00007f68823a9851 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#10 0x00007f68823b3e6a in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#11 0x00007f68823b3f8e in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#12 0x00007f688236a0a1 in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#13 0x00007f688233e79c in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#14 0x00007f68821b6f1e in ?? () from /usr/lib/libmonoboehm-2.0.so.1
#15 0x0000000000400805 in main () at ../MonoEmbeddedMinimal/main.cpp:21
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================