I would like to have your opinions about how to solve this issue :
I made some libraries, which involve in several blocks, these ones are basically some sfunctions, which make calls to several external libraries (.lib file).
These libraries are going to be used by other folks to create some simulink models, which will be "transformed' in a DLL, by using Real-Time Workshop (former Simulink Coder) to perform several tests on a external device.
In order to compile the simulink model I have to link the external library used by the block of the library, by adding the name of the library to the compiling instructions of RTW I usually did that with this instruction
My advisor asks me to simplify the use of the libraries to the other team. He would like when someone adds a block to a model, the external library that is used by the block, will be automatically add to the options of Real-Time Workshop. My solution was to add this instruction
to the CopyFcn Callback of the block.
But that's not good enough for my purpose, because it's not the optimal solution for the maintenance of the blocks
So I started to study how Real-Time workshop works
I found these references
I understood the DLL generation performed by RTW is essentially controlling by three files that are system target file, template makefile and make command.
So inspiring by this example
I thought to modify the .tlc file (used to specify the system language target) by including in the code the libraries that are requested for the compilation of the model. So I thought to add on the top of the code this instruction
I didn't test yet this solution, because I'm not at laboratory and I didn't have the RTW license on my PC
So I would like to have your opinions about this solution, if this one could work, or I'm out-of-way and I should change approach
Every suggestions are welcome
thanks for reading and happy new year of course :)