--- a/mqtt/client.py Wed Jul 24 15:14:02 2024 +0200
+++ b/mqtt/client.py Thu Aug 01 12:09:28 2024 +0200
@@ -122,12 +122,20 @@
#include "iec_types_all.h"
+ config = self.GetConfig() c_code += self.modeldata.GenerateC(c_path, locstr, self.GetConfig())
with open(c_path, 'w') as c_file:
- LDFLAGS = [' "' + os.path.join(PahoMqttCLibraryPath, "libpaho-mqtt3cs.a") + '"', '-lssl', '-lcrypto']
+ if config["AuthType"] == "x509": + static_lib = "libpaho-mqtt3cs.a" + libs = ['-lssl', '-lcrypto'] + static_lib = "libpaho-mqtt3c.a" + LDFLAGS = [' "' + os.path.join(PahoMqttCLibraryPath, static_lib) + '"'] + libs CFLAGS = ' '.join(['-I"' + path + '"' for path in PahoMqttCIncludePaths])