Swap CTN code gen and Libraries code generation order. In general library part of an extension needs to be computed before CTN part.
--- a/ProjectController.py Tue Aug 20 10:01:18 2019 +0200
+++ b/ProjectController.py Tue Aug 20 10:08:11 2019 +0200
@@ -1163,6 +1163,19 @@
def _Generate_runtime(self):
buildpath = self._getBuildPath()
+ # CTN code gen is expected AFTER Libraries code gen,
+ # at least SVGHMI relies on it.
+
+ # Generate C code and compilation params from liraries
+ try:
+ LibCFilesAndCFLAGS, LibLDFLAGS, LibExtraFiles = self.GetLibrariesCCode(
+ buildpath)
+ except Exception:
+ self.logger.write_error(
+ _("Runtime library extensions C code generation failed !\n"))
+ self.logger.write_error(traceback.format_exc())
+ return False
+
# Generate C code and compilation params from confnode hierarchy
try:
CTNLocationCFilesAndCFLAGS, CTNLDFLAGS, CTNExtraFiles = self._Generate_C(
@@ -1174,16 +1187,6 @@
self.logger.write_error(traceback.format_exc())
return False
- # Generate C code and compilation params from liraries
- try:
- LibCFilesAndCFLAGS, LibLDFLAGS, LibExtraFiles = self.GetLibrariesCCode(
- buildpath)
- except Exception:
- self.logger.write_error(
- _("Runtime library extensions C code generation failed !\n"))
- self.logger.write_error(traceback.format_exc())
- return False
-
self.LocationCFilesAndCFLAGS = LibCFilesAndCFLAGS + \
CTNLocationCFilesAndCFLAGS
self.LDFLAGS = CTNLDFLAGS + LibLDFLAGS