フィルターのクリア

Combining mbuild with Cmake flow for using shared library

1 回表示 (過去 30 日間)
Tony Kirke
Tony Kirke 2017 年 2 月 13 日
Hi, I'd like to use the matlab shared library facility but I don't want to have to re-write all of my compilation in Matlab since I have a large amount of files compiled with a CMake flow. I tried instead to just use mbuild on the top level cpp file with something like mbuild -v -DFIXED_TYPE=double -DDISABLE_VENDOR_WARNINGS -D_DISABLE_TRACE_LOGS -DUSE_MAT -DUSE_MATLAB_SHARED_LIB -I/Users/tkirke/projects/lib -I/Users/tkirke/projects/hls -I/Users/tkirke/projects/src/common -I/Users/tkirke/projects/src/.. -I/Users/tkirke/projects/src/rx -I/Users/tkirke/projects/src/rx/.. -I/Users/tkirke/projects/src/rx/../../hls -I/Users/tkirke/projects/src/rx/../../lib -I/Users/tkirke/projects/src/rx/../../lib/spuce/test_utils -I/Applications/MATLAB_R2016a.app/extern/include dmg_top.cpp libimp.dylib ../double_debug/librx.a ../double_debug/libhls_tx.a ../double_debug/libtestlib.a ../double_debug/libddfs.a ../double_debug/libspuce.a ../double_debug/libprobe_plots.a ../double_debug/libutils.a ../double_debug/libplot.a /Users/tkirke/anaconda/lib/libpython2.7.dylib /Applications/MATLAB_R2016a.app/bin/maci64/libeng.dylib ../double_debug/libmat.a ../double_debug/libmatio.a /usr/local/lib/libhdf5.dylib /usr/lib/libpthread.dylib /usr/lib/libz.dylib /usr/lib/libdl.dylib /usr/lib/libm.dylib /Applications/MATLAB_R2016a.app/runtime/maci64/libmwmclmcrrt.dylib
but I get a stack trace when I use it
------------------------------------------------------------------------ Bus error detected at Mon Feb 13 10:56:27 2017 ------------------------------------------------------------------------
Configuration: Crash Decoding : Disabled Crash Mode : continue (default) Default Encoding : ISO-8859-1 Host Name : KirkeWork.local MATLAB Architecture : maci64 MATLAB Root : /Applications/MATLAB/MATLAB_Runtime/v901 MATLAB Version : 9.0.0.341360 (R2016a) Operating System : Darwin 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64 Processor ID : x86 Family 6 Model 70 Stepping 1, GenuineIntel
Fault Count: 1
Abnormal termination: Bus error
Register State (from fault): RAX = 0000000000000000 RBX = 0000000000001000 RCX = 0000700001ccd390 RDX = 00007feaf4604100 RSP = 0000700001cce0e0 RBP = 0000000000007fff RSI = 0000700001ccd910 RDI = 00007feaf4604100
R8 = 0000700001ccd3c0 R9 = 00007fffc24bdc7b
R10 = 0000000115fe0120 R11 = 0000000000003ff4
R12 = 0000700001ccd3f0 R13 = 00007fffc24bdc42
R14 = 00007feaf46040f0 R15 = 0000700001cd6450
RIP = 0000000000007fff RFL = 0000700001cce0e0
CS = 0000700001ccd420 FS = 00007fffc24c0525 GS = 0000000000000101
Stack Trace (from fault):
Ideally, I'd like to just compile in CMake and avoid using mbuild. However, I'm not sure which compile or link switches I should use. Please suggest the best option to use since I have a large amount of files and libraries to link Thanks

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Compiler SDK についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by