How to compile an Embedded Matlab Function in a Custom Block Library

1 view (last 30 days)
Hello,
I wrote a Simulink model with an Embedded Matlab Function. This model compiles and runs without any problems.
Then I put the block with the Embedded Matlab Function into a custom block library and added it to a new model. I cannot run this model because it cannot compile. The error is:
### Linking ... Creating library FinalBattModelTest_sfun.lib and object FinalBattModelTest_sfun.exp
FinalBattModelTest_sfun_registry.obj : error LNK2019: unresolved external symbol sf_BatteryModels_process_check_sum_call referenced in function sf_process_check_sum_call
FinalBattModelTest_sfun_registry.obj : error LNK2019: unresolved external symbol sf_BatteryModels_get_eml_resolved_functions_info referenced in function sf_process_get_eml_resolved_functions_info_call
FinalBattModelTest_sfun_registry.obj : error LNK2019: unresolved external symbol sf_BatteryModels_method_dispatcher referenced in function sf_machine_global_method_dispatcher
FinalBattModelTest_sfun_registry.obj : error LNK2019: unresolved external symbol BatteryModels_terminator referenced in function sf_machine_global_terminator
FinalBattModelTest_sfun_registry.obj : error LNK2019: unresolved external symbol BatteryModels_register_exported_symbols referenced in function sf_register_machine_exported_symbols
FinalBattModelTest_sfun_registry.obj : error LNK2019: unresolved external symbol BatteryModels_initializer referenced in function sf_machine_global_initializer
FinalBattModelTest_sfun_registry.obj : error LNK2019: unresolved external symbol BatteryModels_debug_initialize referenced in function sf_machine_global_initializer
FinalBattModelTest_sfun.mexw64 : fatal error LNK1120: 7 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\link.exe"' : return code '0x460'
Any ideas how to solve this problem?
Thanks in advance!
Cheers,
Christian

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!