You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Christofer Dutz <ch...@c-ware.de> on 2019/07/09 11:58:16 UTC
[C++] [Module Loading] How to implement?
Hi all and especially Markus,
As you told me that Boost is a library for abstracting things done differently on different OSes, I thought: Must be possible to do some dynamic loading of shared libraries.
Seems boost has something like this available: https://www.boost.org/doc/libs/1_70_0/doc/html/boost_dll.html
Is there a reason not to use this? Should eliminate the problems with the code only compiling on Windows.
Chris
AW: [C++] [Module Loading] How to implement?
Posted by Markus Sommer <so...@isb-fn.de>.
Hi Chris,
you're absolutely right.
Until we have successfully got a project up and running, we usually take the static Linking to reduce side effects.
Later we have to change to dynamic linking.
Markus
Freundliche Grüße
Markus Sommer
Geschäftsführer
isb innovative software businesses GmbH
Otto-Lilienthal-Strasse 2
D - 88046 Friedrichshafen
Tel.: +49 (0) 7541 3834-14
Mob: +49 (0) 171 537 8437
Fax: +49 (0) 7541 3834-20
E-Mail: sommer@isb-fn.de
Web: www.isb-fn.de
Geschäftsführer: Markus Sommer, Thomas Zeler
Sitz: Friedrichshafen
Registergericht: Amtsgericht Ulm HRB-Nr. 631624
Important Note: This e-mail and any attachments are confidential, may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status.
Please notify us immediately by reply e-mail and then delete his e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachments or disclose the contents to any other person. Thank you.
-----Ursprüngliche Nachricht-----
Von: Christofer Dutz <ch...@c-ware.de>
Gesendet: Dienstag, 9. Juli 2019 14:57
An: dev@plc4x.apache.org
Betreff: Re: [C++] [Module Loading] How to implement?
Hi Marcus,
well ideally, we'd have it, that you load the pld4x.dll (which mainly is the API module) and then you use that to dynamically load driver implementations.
As we will have multiple drivers and I wouldn't want to statically link in everything. Especially when it comes to embedded system this would increase the Overall size of the binary too much.
But for a first step I guess it's ok to statically link s7. But we shouldn't lose focus on dynamic linking.
Chris
Am 09.07.19, 14:10 schrieb "Markus Sommer" <so...@isb-fn.de>:
Hello Chris,
currently all Boost Libraries are statically linked to the s7.dll.
Markus
Freundliche Grüße
Markus Sommer
Geschäftsführer
isb innovative software businesses GmbH
Otto-Lilienthal-Strasse 2
D - 88046 Friedrichshafen
Tel.: +49 (0) 7541 3834-14
Mob: +49 (0) 171 537 8437
Fax: +49 (0) 7541 3834-20
E-Mail: sommer@isb-fn.de
Web: www.isb-fn.de
Geschäftsführer: Markus Sommer, Thomas Zeler
Sitz: Friedrichshafen
Registergericht: Amtsgericht Ulm HRB-Nr. 631624
Important Note: This e-mail and any attachments are confidential, may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status.
Please notify us immediately by reply e-mail and then delete his e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachments or disclose the contents to any other person. Thank you.
-----Ursprüngliche Nachricht-----
Von: Christofer Dutz <ch...@c-ware.de>
Gesendet: Dienstag, 9. Juli 2019 13:58
An: dev@plc4x.apache.org
Betreff: [C++] [Module Loading] How to implement?
Hi all and especially Markus,
As you told me that Boost is a library for abstracting things done differently on different OSes, I thought: Must be possible to do some dynamic loading of shared libraries.
Seems boost has something like this available: https://www.boost.org/doc/libs/1_70_0/doc/html/boost_dll.html
Is there a reason not to use this? Should eliminate the problems with the code only compiling on Windows.
Chris
Re: [C++] [Module Loading] How to implement?
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Marcus,
well ideally, we'd have it, that you load the pld4x.dll (which mainly is the API module) and then you use that to dynamically load driver implementations.
As we will have multiple drivers and I wouldn't want to statically link in everything. Especially when it comes to embedded system this would increase the
Overall size of the binary too much.
But for a first step I guess it's ok to statically link s7. But we shouldn't lose focus on dynamic linking.
Chris
Am 09.07.19, 14:10 schrieb "Markus Sommer" <so...@isb-fn.de>:
Hello Chris,
currently all Boost Libraries are statically linked to the s7.dll.
Markus
Freundliche Grüße
Markus Sommer
Geschäftsführer
isb innovative software businesses GmbH
Otto-Lilienthal-Strasse 2
D - 88046 Friedrichshafen
Tel.: +49 (0) 7541 3834-14
Mob: +49 (0) 171 537 8437
Fax: +49 (0) 7541 3834-20
E-Mail: sommer@isb-fn.de
Web: www.isb-fn.de
Geschäftsführer: Markus Sommer, Thomas Zeler
Sitz: Friedrichshafen
Registergericht: Amtsgericht Ulm HRB-Nr. 631624
Important Note: This e-mail and any attachments are confidential, may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status.
Please notify us immediately by reply e-mail and then delete his e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachments or disclose the contents to any other person. Thank you.
-----Ursprüngliche Nachricht-----
Von: Christofer Dutz <ch...@c-ware.de>
Gesendet: Dienstag, 9. Juli 2019 13:58
An: dev@plc4x.apache.org
Betreff: [C++] [Module Loading] How to implement?
Hi all and especially Markus,
As you told me that Boost is a library for abstracting things done differently on different OSes, I thought: Must be possible to do some dynamic loading of shared libraries.
Seems boost has something like this available: https://www.boost.org/doc/libs/1_70_0/doc/html/boost_dll.html
Is there a reason not to use this? Should eliminate the problems with the code only compiling on Windows.
Chris
AW: [C++] [Module Loading] How to implement?
Posted by Markus Sommer <so...@isb-fn.de>.
Hello Chris,
currently all Boost Libraries are statically linked to the s7.dll.
Markus
Freundliche Grüße
Markus Sommer
Geschäftsführer
isb innovative software businesses GmbH
Otto-Lilienthal-Strasse 2
D - 88046 Friedrichshafen
Tel.: +49 (0) 7541 3834-14
Mob: +49 (0) 171 537 8437
Fax: +49 (0) 7541 3834-20
E-Mail: sommer@isb-fn.de
Web: www.isb-fn.de
Geschäftsführer: Markus Sommer, Thomas Zeler
Sitz: Friedrichshafen
Registergericht: Amtsgericht Ulm HRB-Nr. 631624
Important Note: This e-mail and any attachments are confidential, may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status.
Please notify us immediately by reply e-mail and then delete his e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachments or disclose the contents to any other person. Thank you.
-----Ursprüngliche Nachricht-----
Von: Christofer Dutz <ch...@c-ware.de>
Gesendet: Dienstag, 9. Juli 2019 13:58
An: dev@plc4x.apache.org
Betreff: [C++] [Module Loading] How to implement?
Hi all and especially Markus,
As you told me that Boost is a library for abstracting things done differently on different OSes, I thought: Must be possible to do some dynamic loading of shared libraries.
Seems boost has something like this available: https://www.boost.org/doc/libs/1_70_0/doc/html/boost_dll.html
Is there a reason not to use this? Should eliminate the problems with the code only compiling on Windows.
Chris