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

3 visualizaciones (últimos 30 días)
Marcel Werner
Marcel Werner el 29 de Jul. de 2015
Comentada: Simon Silge el 31 de Jul. de 2018
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 comentarios
Simon Silge
Simon Silge el 10 de Jul. de 2018
Hello! Have you ever solved that question?
Simon Silge
Simon Silge el 31 de Jul. de 2018
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Upgrading Hydraulic Models to Use Isothermal Liquid Blocks en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by