Libraries not found/accessible while building s-function with mex
Show older comments
Hi,
I am trying to use an S-function example from an external tool IBM Rational Rhapsody developer. I am able to build/link the files in Rhapsody. I try to build the generated .m files in matlab. It seems to build fine, but the linker has problems finding some libraries. I have used the following command for building:
mex -v -g -DWIN32 -D_OMINSTRUMENT -D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH -I. -I"C:\Users\PI\IBM\Rational\Rhapsody\8.0\Share\LangC" -I"C:\Users\PI\IBM\Rational\Rhapsody\8.0\Share\LangC\oxf" -I"C:\Users\PI\IBM\Rational\Rhapsody\8.0\Share\LangC\osconfig\WIN32" -I"C:\Users\PI\IBM\Rational\Rhapsody\8.0\Share\LangC\aom" -I"C:\Users\PI\IBM\Rational\Rhapsody\8.0\Share\LangCpp\tom" -I"C:\Users\PI\IBM\Rational\Rhapsody\8.0\Share/Profiles/Simulink" RhapSFunc_OnWhenGreaterThanTen.c OnWhenGreaterThanTen_GreaterThanTen_SP_C.c OnWhenGreaterThanTen_x_SP_C.c Default.c OnWhenGreaterThanTen.c intFlowInterface.c RiCBooleanFlowInterface.c FlowPortInterfaces.c "C:\Users\PI\IBM\Rational\Rhapsody\8.0\Share/LangC/oxf/RiCSFunctionTimer.c" -L"C:\Users\PI\IBM\Rational\Rhapsody\8.0\Share\LangC\lib\" -lMSVC10aomanim -lMSVC10omComAppl -lMSVC10oxfinst -lwsock32 -lwinmm
I get the following errors(partial list below)
Creating library C:\Users\PI\AppData\Local\Temp\mex_I3dtFz\templib.x and object C:\Users\PI\AppData\Local\Temp\mex_I3dtFz\templib.exp RhapSFunc_OnWhenGreaterThanTen.obj : error LNK2019: unresolved external symbol RiCOXFStart referenced in function mdlStart RhapSFunc_OnWhenGreaterThanTen.obj : error LNK2019: unresolved external symbol RiCMainTask referenced in function mdlStart OnWhenGreaterThanTen.obj : error LNK2001: unresolved external symbol RiCMainTask ..... ...... ...... RiCSFunctionTimer.obj : error LNK2019: unresolved external symbol RiCTimerManager_cbkBridgeWithTime referenced in function RiCSFunctionTimer_CreateMethod RhapSFunc_OnWhenGreaterThanTen.mexw64 : fatal error LNK1120: 65 unresolved externals
C:\PROGRA~1\MATLAB\R2013B\BIN\MEX.PL: Error: Link of 'RhapSFunc_OnWhenGreaterThanTen.mexw64' failed.
Unable to complete successfully.
Any pointers would be helpful.
Best regards Padma
Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!