Check if header is already included in TLC file.
    2 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Niravkumar Ambaliya
 el 18 de Nov. de 2019
  
    
    
    
    
    Editada: Niravkumar Ambaliya
 el 18 de Nov. de 2019
            I am using C-Mex S-function block and I have written .c and .tlc file for the block. The block needs a header file to be included when code is generated using embedded coder. If i use just one instance of the block, header file is included just once. But if I use multiple instances of the same block in the model then header file is included multiple times. How do i check in TLC if header file is already included? 
I am using the following in my block tlc:
%function BlockTypeSetup(block, system) void
    %openfile buffer
    #include "MyHeader.h"
    %closefile buffer
    %<LibCacheIncludes(buffer)>
%endfunction %% BlockTypeSetup
Any help is greatly appreciated. Thanks.
0 comentarios
Respuestas (0)
Ver también
Categorías
				Más información sobre Target Language Compiler 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!