|
Re: ExternLibrary Stereotype [message #1784107 is a reply to message #1783909] |
Thu, 22 March 2018 15:41 |
|
Hi Yoann,
for #includes and libraries, you can just indicate the name of the include file/library, respectively. For instance, for the pthread library the "include" attribute contains "pthread.h" and the "libs" attribute contains just "pthread". If you need to indicate directories in which these files can be found, you need some sort of a file location. The code generator will just copy the strings, so everything that CDT supports for specifying directory locations is implicitly is supported.
A common use case might be to reference a file or library relative to the workspace. This can be done via the String "${workspace_loc:/<your project name>/...".
Hope that helps
Ansgar
|
|
|
|
|
Re: ExternLibrary Stereotype [message #1797964 is a reply to message #1797910] |
Fri, 09 November 2018 09:30 |
|
Hi Yoann,
if you use the stereotype "ExternLibrary", you can only influence the "-I" compiler option via the "includePaths" attribute, i.e. add paths for finding includes but do add includes itself. If you think that it should be possible as well to configure the CDT project with automatic includes, you can post a bug with severity "enhancements".
However, if you declare a class or primitive type inside the stereotyped package with the name "iostream" and then declare a dependency towards this type from your class, the required #include will be generated file (not the automatic include for all files via the CDT settings). You need to tag the "iostream" type with the "External" stereotype and set its incPath to ensure that the .h extension is suppressed.
A potential alternative is to the use "Include" stereotype on your class.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05256 seconds