Hi Pascal,
It seems that the linking is failing because the ‘-lpthread’ flag is missing after ‘.o’ files. To resolve this and add ‘-lpthread’ after the object files, you can try the following steps:
- Open your model in Simulink.
- Go to the ‘Model Configuration Parameters’ by clicking on ‘Model Settings’ in the ‘Modeling’ tab or by pressing Ctrl+E.
- Navigate to the ‘Simulation Target’ section.
- Select the ‘Code Information’ tab.
- In the ‘Code Information’ tab, there are fields for inserting custom code snippets, such as ‘Include directories,’ ‘Source files’, ‘Libraries’, etc.
- In the ‘Linker flags’ field, add ‘-lpthread’. This will ensure that ‘-lpthread’ is added at the end of the link command.
Alternatively, you can consider the method outlined in the following MATLAB Answer: https://www.mathworks.com/matlabcentral/answers/109672-how-can-i-add-additional-linker-flags-to-the-generated-makefile
I hope this helps.
Best Regards,
Sachin