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 Center および File ExchangeUpgrading 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