How can I solve Simscape C-Code-Linker problems?
조회 수: 3 (최근 30일)
이전 댓글 표시
Basics
I got a problem with linking of Simscape generated C-Code after compiling.
There are some 'undefined references' to used functions, which will be defined and be used in confusing ssc_sli_xxxxxxxx.c-files (see code).
Error output:
TEST_FPU.o: In function `nesl_lease_simulator':
TEST_Shell.c:(.text+0x1edc): undefined reference to `nesl_get_registry'
TEST_FPU.o: In function `nesl_erase_simulator':
TEST_Shell.c:(.text+0x1f40): undefined reference to `nesl_get_registry'
TEST_FPU.o: In function `rtw_diagnostics_msg':
TEST_Shell.c:(.text+0x21e4): undefined reference to `neu_create_diagnostic_tree_printer'
TEST_FPU.o: In function `rtw_create_diagnostics':
TEST_Shell.c:(.text+0x2280): undefined reference to `neu_create_diagnostic_manager'
TEST_FPU.o: In function `SUB_SYSS_step':
TEST_Shell.c:(.text+0x5290): undefined reference to `rt_UpdateTXYLogVars'
TEST_FPU.o: In function `SUB_SYSS_initialize':
TEST_Shell.c:(.text+0x62a0): undefined reference to `rt_StartDataLoggingWithStartTime'
TEST_FPU.o: In function `SUB_SYSS_4a2c61b7_gateway':
TEST_Shell.c:(.text+0x8348): undefined reference to `neu_get_csparse_linear_algebra'
TEST_Shell.c:(.text+0x83a8): undefined reference to `SUB_SYSS_4a2c61b7_1_dae'
TEST_Shell.c:(.text+0x841c): undefined reference to `nesl_register_simulator_group'
Setup
- Windows 7 operating system
- R2014a 32-bit, Simulink, Simscape, Simhydraulics, C/C++-Coder
- GCC 4.7.3 Compiler
Questions
- Are there similiar experiences?
- Are there any thought-provoking impulses?
댓글 수: 2
Simon Silge
2018년 7월 31일
I had a similar problem, here's my solution: https://de.mathworks.com/matlabcentral/answers/409390-compilation-problems-for-generated-code-for-simscape-model?s_tid=prof_contriblnk
Short answer: you need to make sure all the neccesary header files and lib files can be found by giving their paths. All the unresolved or undefined references are due to not finding a certain neccessary file.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Upgrading Hydraulic Models to Use Isothermal Liquid Blocks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!