How can I solve Simscape C-Code-Linker problems?

조회 수: 3 (최근 30일)
Marcel Werner
Marcel Werner 2015년 7월 29일
댓글: Simon Silge 2018년 7월 31일
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
Simon Silge 2018년 7월 10일
Hello! Have you ever solved that question?
Simon Silge
Simon Silge 2018년 7월 31일
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 CenterFile 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!

Translated by