How can I solve Simscape C-Code-Linker problems?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Simon Silge
am 31 Jul. 2018
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.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Upgrading Hydraulic Models to Use Isothermal Liquid Blocks finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!