In S function it is required to include the .c file that is having the defination of the function?
古いコメントを表示
I am trying to create the s function from c code.Those having number of C files and H files.
I am calling some function XYZ() in static void mdlOutputs(SimStruct *S, int_T tid) of s function. I have included XYZ.c that contains the defination of XYZ for compilation. But if XYZ contains A(),B(),C() function then is it required to include all the c files those are having definitions for this.And also the variable definitions .h files? In XYZ.c all the .h files that is having the extern declaration (i.e Interface files) for A(),B(),C() and variables are included. XYZ.C is getting complied in Visual studio. So my question is it is needed to include all the .c and .h files those contains the definitions of variables and functions.
回答 (1 件)
Kaustubha Govind
2013 年 8 月 7 日
0 投票
Yes, you do need to link against the object files of A(), B() and C() in addition to XYZ.c. How are you compiling XYZ.c in Visual Studio? Is it producing an executable or library, or just an object (.obj) file?
カテゴリ
ヘルプ センター および File Exchange で Naming Conventions についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!