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 2018/12/27 15:36:54 UTC

Update to the C++ Module

Hi all,

good thing with holidays is, that you have enough time for the experiments that take a lot of time.
So now it seems I have finished a first version of a Maven build that is able to compile the C++ API module which Markus provided us with.
I had to tweak the code a little, but now it seems I was able to build on 64bit machines with Mac, Linux (Ubuntu) and Windows 10.

In contrast to Java, C++ doesn’t have a nice an simple library repository. Also wouldn’t the binaries built on a mac be runnable on Windows for example.
Markus’ initial code used a library called “boost” which seems to provide a platform independent abstraction of some of the essential things we need (Sockets, Types, …)
So next to the “api” module is a “libs” module, which does nothing else than download an build any required third party libraries and to install them in the “libs/libs” directory.

This directory is then explicitly imported in the builds of the other modules (currently just the API)

As building the boost lib takes a very, very long time, I decided to have it only built, if the “libs/libs” directory is missing. So if you are building for the first time … get yourself a big cup of coffee.
Hopefully we’ll be able to strip that build down to the parts we need and not compile everything.

The build itself is performed with a tool called “CMake”. This claims to be a meta-build system that allows generating everything needed to build with a variety of other build systems.
On windows it requires a gcc compliant compiler to be installed. I decided to go down the mingw path. So if you want to build from the commandline with a Windows system, be sure to install that first and to add the bin directory of that to your systems PATH. (http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download)

Right now the module is not directly integrated to be automatically built with the rest of the project. In order to build the C++ part, just change the directory into the “plc4cpp” directory and do a “mvn install” in there.

I would be really happy for some feedback, as this stuff is a lot more complicated to configure than in my normal Java world.
I hope I got everything right.

So … then I’ll wish you all happy testing ;-)


Chris

Re: Update to the C++ Module

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Markus,

thank YOU for the first C++ code :)

One of the reasons I had a deeper look into CMake was the ability to configure builds using a variety of systems. One of them is Visual Studio.
It should be possible to have Maven generate the configuration needed to build things in Visual Studio [1]. 

What version are you using? Perhaps I can come up with a comman-line, which you can simply use.

Chris


[1] https://docs.microsoft.com/de-de/cpp/ide/cmake-tools-for-visual-cpp?view=vs-2017



Am 07.01.19, 10:35 schrieb "Markus Sommer" <so...@isb-fn.de>:

    Hi all,
    
    everyone a happy new year 2019.
    
    Chris thanks for building the toolchain.
    
    Just adapt our other sources to the toolchain and the gcc compiler.
    
    Best regards
    
    Markus
    
    Mit freundlichen Grüßen
    
    Markus Sommer
    Geschäftsführer
    
    isb innovative software businesses GmbH
    Otto-Lilienthal-Straße 2
    D 88046 Friedrichshafen
    
    Tel          +49 (0) 7541 3834-14
    Fax         +49 (0) 7541 3834-20
    Mobil    +49 (0) 171 537 8437
    
    Mail to  sommer@isb-fn.de
    http://www.isb-fn.de
    
    Geschäftsführer: Markus Sommer, Thomas Zeler
    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 this 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: Donnerstag, 3. Januar 2019 15:10
    An: dev@plc4x.apache.org
    Betreff: Re: Update to the C++ Module
    
    Hi all,
    
    so I just pushed some more updates to the C++ build ... 
    Now boos only build the "System" module which speeds up the build dramatically.
    Also did I notice one little thing: When building boost on Windows, it adds an annoying "boost-1_69" directory in between. 
    So I had to add a second include directory for windows machines. Unfortunately this contains the boost version. 
    As we manage the versions in the pom.xml this is unfortunate, so I had to have the CMakeLists.txt file be processed by Maven before actually building.
    
    So what happens now in a build is:
    - the src/main/cmake/CMakeLists.txt file is copied to target/cmake/CMakeLists.txt and all variables in it are replaced by maven properties.
    - the target/cmake/CMakeLists.txt is used to generate the build in target/make
    - the make build is run in target/make the output is in target/make/libapi.a (for the API module)
    
    Think I will have to sign up for helping the CMake project guys to get some issues in the cmake plugin fixed ... there is great room for improvement.
    
    But I'm happy it's working now. Will probably fine-tune some things as I come up with solutions for them.
    
    Chris
    
    
    
    
    
    Am 28.12.18, 14:04 schrieb "Christofer Dutz" <ch...@c-ware.de>:
    
        Hi Markus,
        
        after managing to build on all platforms I did try to reduce the number of modules built.
        From a quick look its seems as if you were using a "multiprecision" and "functional" module.
        
        But when having the "b2.exe" show me a list of all modules these weren't listed.
        
        Could you please provide me with a list of options for a minimal build? I would take over and make sure it runs on all main platforms after that ...
        
        Chris
        
        
        Am 28.12.18, 11:29 schrieb "Markus Sommer" <so...@isb-fn.de>:
        
            Hi all,
            
            @ Chris: Thank you for the good work on Christmas.
            
            A few words to Boost (https://www.boost.org/). Boost is a collection of individual libraries, mostly based on templates. i.e. Later, we do not have to compile the entire Boost library platform-specific. Many concepts of the C ++ standard have been developed many years ago in the environment of Boost.
            
            If we want to Support the area of embedded system, we can only use C / C ++ in my view.
            
            According to the current state, we would like to follow the Java API and thus reduce the maintenance hell.
            
            Best regards, happy new year.
            
            Markus
            
            Mit freundlichen Grüßen
            
            Markus Sommer
            Geschäftsführer
            
            isb innovative software businesses GmbH
            Otto-Lilienthal-Straße 2
            D 88046 Friedrichshafen
            
            Tel          +49 (0) 7541 3834-14
            Fax         +49 (0) 7541 3834-20
            Mobil    +49 (0) 171 537 8437
            
            Mail to  sommer@isb-fn.de
            http://www.isb-fn.de
            
            Geschäftsführer: Markus Sommer, Thomas Zeler
            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 this 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: Donnerstag, 27. Dezember 2018 16:37
            An: dev@plc4x.apache.org
            Betreff: Update to the C++ Module
            
            Hi all,
            
            good thing with holidays is, that you have enough time for the experiments that take a lot of time.
            So now it seems I have finished a first version of a Maven build that is able to compile the C++ API module which Markus provided us with.
            I had to tweak the code a little, but now it seems I was able to build on 64bit machines with Mac, Linux (Ubuntu) and Windows 10.
            
            In contrast to Java, C++ doesn’t have a nice an simple library repository. Also wouldn’t the binaries built on a mac be runnable on Windows for example.
            Markus’ initial code used a library called “boost” which seems to provide a platform independent abstraction of some of the essential things we need (Sockets, Types, …) So next to the “api” module is a “libs” module, which does nothing else than download an build any required third party libraries and to install them in the “libs/libs” directory.
            
            This directory is then explicitly imported in the builds of the other modules (currently just the API)
            
            As building the boost lib takes a very, very long time, I decided to have it only built, if the “libs/libs” directory is missing. So if you are building for the first time … get yourself a big cup of coffee.
            Hopefully we’ll be able to strip that build down to the parts we need and not compile everything.
            
            The build itself is performed with a tool called “CMake”. This claims to be a meta-build system that allows generating everything needed to build with a variety of other build systems.
            On windows it requires a gcc compliant compiler to be installed. I decided to go down the mingw path. So if you want to build from the commandline with a Windows system, be sure to install that first and to add the bin directory of that to your systems PATH. (http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download)
            
            Right now the module is not directly integrated to be automatically built with the rest of the project. In order to build the C++ part, just change the directory into the “plc4cpp” directory and do a “mvn install” in there.
            
            I would be really happy for some feedback, as this stuff is a lot more complicated to configure than in my normal Java world.
            I hope I got everything right.
            
            So … then I’ll wish you all happy testing ;-)
            
            
            Chris
            
        
        
    
    


AW: Update to the C++ Module

Posted by Markus Sommer <so...@isb-fn.de>.
Hi all,

everyone a happy new year 2019.

Chris thanks for building the toolchain.

Just adapt our other sources to the toolchain and the gcc compiler.

Best regards

Markus

Mit freundlichen Grüßen

Markus Sommer
Geschäftsführer

isb innovative software businesses GmbH
Otto-Lilienthal-Straße 2
D 88046 Friedrichshafen

Tel          +49 (0) 7541 3834-14
Fax         +49 (0) 7541 3834-20
Mobil    +49 (0) 171 537 8437

Mail to  sommer@isb-fn.de
http://www.isb-fn.de

Geschäftsführer: Markus Sommer, Thomas Zeler
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 this 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: Donnerstag, 3. Januar 2019 15:10
An: dev@plc4x.apache.org
Betreff: Re: Update to the C++ Module

Hi all,

so I just pushed some more updates to the C++ build ... 
Now boos only build the "System" module which speeds up the build dramatically.
Also did I notice one little thing: When building boost on Windows, it adds an annoying "boost-1_69" directory in between. 
So I had to add a second include directory for windows machines. Unfortunately this contains the boost version. 
As we manage the versions in the pom.xml this is unfortunate, so I had to have the CMakeLists.txt file be processed by Maven before actually building.

So what happens now in a build is:
- the src/main/cmake/CMakeLists.txt file is copied to target/cmake/CMakeLists.txt and all variables in it are replaced by maven properties.
- the target/cmake/CMakeLists.txt is used to generate the build in target/make
- the make build is run in target/make the output is in target/make/libapi.a (for the API module)

Think I will have to sign up for helping the CMake project guys to get some issues in the cmake plugin fixed ... there is great room for improvement.

But I'm happy it's working now. Will probably fine-tune some things as I come up with solutions for them.

Chris





Am 28.12.18, 14:04 schrieb "Christofer Dutz" <ch...@c-ware.de>:

    Hi Markus,
    
    after managing to build on all platforms I did try to reduce the number of modules built.
    From a quick look its seems as if you were using a "multiprecision" and "functional" module.
    
    But when having the "b2.exe" show me a list of all modules these weren't listed.
    
    Could you please provide me with a list of options for a minimal build? I would take over and make sure it runs on all main platforms after that ...
    
    Chris
    
    
    Am 28.12.18, 11:29 schrieb "Markus Sommer" <so...@isb-fn.de>:
    
        Hi all,
        
        @ Chris: Thank you for the good work on Christmas.
        
        A few words to Boost (https://www.boost.org/). Boost is a collection of individual libraries, mostly based on templates. i.e. Later, we do not have to compile the entire Boost library platform-specific. Many concepts of the C ++ standard have been developed many years ago in the environment of Boost.
        
        If we want to Support the area of embedded system, we can only use C / C ++ in my view.
        
        According to the current state, we would like to follow the Java API and thus reduce the maintenance hell.
        
        Best regards, happy new year.
        
        Markus
        
        Mit freundlichen Grüßen
        
        Markus Sommer
        Geschäftsführer
        
        isb innovative software businesses GmbH
        Otto-Lilienthal-Straße 2
        D 88046 Friedrichshafen
        
        Tel          +49 (0) 7541 3834-14
        Fax         +49 (0) 7541 3834-20
        Mobil    +49 (0) 171 537 8437
        
        Mail to  sommer@isb-fn.de
        http://www.isb-fn.de
        
        Geschäftsführer: Markus Sommer, Thomas Zeler
        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 this 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: Donnerstag, 27. Dezember 2018 16:37
        An: dev@plc4x.apache.org
        Betreff: Update to the C++ Module
        
        Hi all,
        
        good thing with holidays is, that you have enough time for the experiments that take a lot of time.
        So now it seems I have finished a first version of a Maven build that is able to compile the C++ API module which Markus provided us with.
        I had to tweak the code a little, but now it seems I was able to build on 64bit machines with Mac, Linux (Ubuntu) and Windows 10.
        
        In contrast to Java, C++ doesn’t have a nice an simple library repository. Also wouldn’t the binaries built on a mac be runnable on Windows for example.
        Markus’ initial code used a library called “boost” which seems to provide a platform independent abstraction of some of the essential things we need (Sockets, Types, …) So next to the “api” module is a “libs” module, which does nothing else than download an build any required third party libraries and to install them in the “libs/libs” directory.
        
        This directory is then explicitly imported in the builds of the other modules (currently just the API)
        
        As building the boost lib takes a very, very long time, I decided to have it only built, if the “libs/libs” directory is missing. So if you are building for the first time … get yourself a big cup of coffee.
        Hopefully we’ll be able to strip that build down to the parts we need and not compile everything.
        
        The build itself is performed with a tool called “CMake”. This claims to be a meta-build system that allows generating everything needed to build with a variety of other build systems.
        On windows it requires a gcc compliant compiler to be installed. I decided to go down the mingw path. So if you want to build from the commandline with a Windows system, be sure to install that first and to add the bin directory of that to your systems PATH. (http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download)
        
        Right now the module is not directly integrated to be automatically built with the rest of the project. In order to build the C++ part, just change the directory into the “plc4cpp” directory and do a “mvn install” in there.
        
        I would be really happy for some feedback, as this stuff is a lot more complicated to configure than in my normal Java world.
        I hope I got everything right.
        
        So … then I’ll wish you all happy testing ;-)
        
        
        Chris
        
    
    


Re: Update to the C++ Module

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi all,

so I just pushed some more updates to the C++ build ... 
Now boos only build the "System" module which speeds up the build dramatically.
Also did I notice one little thing: When building boost on Windows, it adds an annoying "boost-1_69" directory in between. 
So I had to add a second include directory for windows machines. Unfortunately this contains the boost version. 
As we manage the versions in the pom.xml this is unfortunate, so I had to have the CMakeLists.txt file be processed by Maven before actually building.

So what happens now in a build is:
- the src/main/cmake/CMakeLists.txt file is copied to target/cmake/CMakeLists.txt and all variables in it are replaced by maven properties.
- the target/cmake/CMakeLists.txt is used to generate the build in target/make
- the make build is run in target/make the output is in target/make/libapi.a (for the API module)

Think I will have to sign up for helping the CMake project guys to get some issues in the cmake plugin fixed ... there is great room for improvement.

But I'm happy it's working now. Will probably fine-tune some things as I come up with solutions for them.

Chris





Am 28.12.18, 14:04 schrieb "Christofer Dutz" <ch...@c-ware.de>:

    Hi Markus,
    
    after managing to build on all platforms I did try to reduce the number of modules built.
    From a quick look its seems as if you were using a "multiprecision" and "functional" module.
    
    But when having the "b2.exe" show me a list of all modules these weren't listed.
    
    Could you please provide me with a list of options for a minimal build? I would take over and make sure it runs on all main platforms after that ...
    
    Chris
    
    
    Am 28.12.18, 11:29 schrieb "Markus Sommer" <so...@isb-fn.de>:
    
        Hi all,
        
        @ Chris: Thank you for the good work on Christmas.
        
        A few words to Boost (https://www.boost.org/). Boost is a collection of individual libraries, mostly based on templates. i.e. Later, we do not have to compile the entire Boost library platform-specific. Many concepts of the C ++ standard have been developed many years ago in the environment of Boost.
        
        If we want to Support the area of embedded system, we can only use C / C ++ in my view.
        
        According to the current state, we would like to follow the Java API and thus reduce the maintenance hell.
        
        Best regards, happy new year.
        
        Markus
        
        Mit freundlichen Grüßen
        
        Markus Sommer
        Geschäftsführer
        
        isb innovative software businesses GmbH
        Otto-Lilienthal-Straße 2
        D 88046 Friedrichshafen
        
        Tel          +49 (0) 7541 3834-14
        Fax         +49 (0) 7541 3834-20
        Mobil    +49 (0) 171 537 8437
        
        Mail to  sommer@isb-fn.de
        http://www.isb-fn.de
        
        Geschäftsführer: Markus Sommer, Thomas Zeler
        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 this 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: Donnerstag, 27. Dezember 2018 16:37
        An: dev@plc4x.apache.org
        Betreff: Update to the C++ Module
        
        Hi all,
        
        good thing with holidays is, that you have enough time for the experiments that take a lot of time.
        So now it seems I have finished a first version of a Maven build that is able to compile the C++ API module which Markus provided us with.
        I had to tweak the code a little, but now it seems I was able to build on 64bit machines with Mac, Linux (Ubuntu) and Windows 10.
        
        In contrast to Java, C++ doesn’t have a nice an simple library repository. Also wouldn’t the binaries built on a mac be runnable on Windows for example.
        Markus’ initial code used a library called “boost” which seems to provide a platform independent abstraction of some of the essential things we need (Sockets, Types, …) So next to the “api” module is a “libs” module, which does nothing else than download an build any required third party libraries and to install them in the “libs/libs” directory.
        
        This directory is then explicitly imported in the builds of the other modules (currently just the API)
        
        As building the boost lib takes a very, very long time, I decided to have it only built, if the “libs/libs” directory is missing. So if you are building for the first time … get yourself a big cup of coffee.
        Hopefully we’ll be able to strip that build down to the parts we need and not compile everything.
        
        The build itself is performed with a tool called “CMake”. This claims to be a meta-build system that allows generating everything needed to build with a variety of other build systems.
        On windows it requires a gcc compliant compiler to be installed. I decided to go down the mingw path. So if you want to build from the commandline with a Windows system, be sure to install that first and to add the bin directory of that to your systems PATH. (http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download)
        
        Right now the module is not directly integrated to be automatically built with the rest of the project. In order to build the C++ part, just change the directory into the “plc4cpp” directory and do a “mvn install” in there.
        
        I would be really happy for some feedback, as this stuff is a lot more complicated to configure than in my normal Java world.
        I hope I got everything right.
        
        So … then I’ll wish you all happy testing ;-)
        
        
        Chris
        
    
    


Re: Update to the C++ Module

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Markus,

after managing to build on all platforms I did try to reduce the number of modules built.
From a quick look its seems as if you were using a "multiprecision" and "functional" module.

But when having the "b2.exe" show me a list of all modules these weren't listed.

Could you please provide me with a list of options for a minimal build? I would take over and make sure it runs on all main platforms after that ...

Chris


Am 28.12.18, 11:29 schrieb "Markus Sommer" <so...@isb-fn.de>:

    Hi all,
    
    @ Chris: Thank you for the good work on Christmas.
    
    A few words to Boost (https://www.boost.org/). Boost is a collection of individual libraries, mostly based on templates. i.e. Later, we do not have to compile the entire Boost library platform-specific. Many concepts of the C ++ standard have been developed many years ago in the environment of Boost.
    
    If we want to Support the area of embedded system, we can only use C / C ++ in my view.
    
    According to the current state, we would like to follow the Java API and thus reduce the maintenance hell.
    
    Best regards, happy new year.
    
    Markus
    
    Mit freundlichen Grüßen
    
    Markus Sommer
    Geschäftsführer
    
    isb innovative software businesses GmbH
    Otto-Lilienthal-Straße 2
    D 88046 Friedrichshafen
    
    Tel          +49 (0) 7541 3834-14
    Fax         +49 (0) 7541 3834-20
    Mobil    +49 (0) 171 537 8437
    
    Mail to  sommer@isb-fn.de
    http://www.isb-fn.de
    
    Geschäftsführer: Markus Sommer, Thomas Zeler
    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 this 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: Donnerstag, 27. Dezember 2018 16:37
    An: dev@plc4x.apache.org
    Betreff: Update to the C++ Module
    
    Hi all,
    
    good thing with holidays is, that you have enough time for the experiments that take a lot of time.
    So now it seems I have finished a first version of a Maven build that is able to compile the C++ API module which Markus provided us with.
    I had to tweak the code a little, but now it seems I was able to build on 64bit machines with Mac, Linux (Ubuntu) and Windows 10.
    
    In contrast to Java, C++ doesn’t have a nice an simple library repository. Also wouldn’t the binaries built on a mac be runnable on Windows for example.
    Markus’ initial code used a library called “boost” which seems to provide a platform independent abstraction of some of the essential things we need (Sockets, Types, …) So next to the “api” module is a “libs” module, which does nothing else than download an build any required third party libraries and to install them in the “libs/libs” directory.
    
    This directory is then explicitly imported in the builds of the other modules (currently just the API)
    
    As building the boost lib takes a very, very long time, I decided to have it only built, if the “libs/libs” directory is missing. So if you are building for the first time … get yourself a big cup of coffee.
    Hopefully we’ll be able to strip that build down to the parts we need and not compile everything.
    
    The build itself is performed with a tool called “CMake”. This claims to be a meta-build system that allows generating everything needed to build with a variety of other build systems.
    On windows it requires a gcc compliant compiler to be installed. I decided to go down the mingw path. So if you want to build from the commandline with a Windows system, be sure to install that first and to add the bin directory of that to your systems PATH. (http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download)
    
    Right now the module is not directly integrated to be automatically built with the rest of the project. In order to build the C++ part, just change the directory into the “plc4cpp” directory and do a “mvn install” in there.
    
    I would be really happy for some feedback, as this stuff is a lot more complicated to configure than in my normal Java world.
    I hope I got everything right.
    
    So … then I’ll wish you all happy testing ;-)
    
    
    Chris
    


AW: Update to the C++ Module

Posted by Markus Sommer <so...@isb-fn.de>.
Hi all,

@ Chris: Thank you for the good work on Christmas.

A few words to Boost (https://www.boost.org/). Boost is a collection of individual libraries, mostly based on templates. i.e. Later, we do not have to compile the entire Boost library platform-specific. Many concepts of the C ++ standard have been developed many years ago in the environment of Boost.

If we want to Support the area of embedded system, we can only use C / C ++ in my view.

According to the current state, we would like to follow the Java API and thus reduce the maintenance hell.

Best regards, happy new year.

Markus

Mit freundlichen Grüßen

Markus Sommer
Geschäftsführer

isb innovative software businesses GmbH
Otto-Lilienthal-Straße 2
D 88046 Friedrichshafen

Tel          +49 (0) 7541 3834-14
Fax         +49 (0) 7541 3834-20
Mobil    +49 (0) 171 537 8437

Mail to  sommer@isb-fn.de
http://www.isb-fn.de

Geschäftsführer: Markus Sommer, Thomas Zeler
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 this 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: Donnerstag, 27. Dezember 2018 16:37
An: dev@plc4x.apache.org
Betreff: Update to the C++ Module

Hi all,

good thing with holidays is, that you have enough time for the experiments that take a lot of time.
So now it seems I have finished a first version of a Maven build that is able to compile the C++ API module which Markus provided us with.
I had to tweak the code a little, but now it seems I was able to build on 64bit machines with Mac, Linux (Ubuntu) and Windows 10.

In contrast to Java, C++ doesn’t have a nice an simple library repository. Also wouldn’t the binaries built on a mac be runnable on Windows for example.
Markus’ initial code used a library called “boost” which seems to provide a platform independent abstraction of some of the essential things we need (Sockets, Types, …) So next to the “api” module is a “libs” module, which does nothing else than download an build any required third party libraries and to install them in the “libs/libs” directory.

This directory is then explicitly imported in the builds of the other modules (currently just the API)

As building the boost lib takes a very, very long time, I decided to have it only built, if the “libs/libs” directory is missing. So if you are building for the first time … get yourself a big cup of coffee.
Hopefully we’ll be able to strip that build down to the parts we need and not compile everything.

The build itself is performed with a tool called “CMake”. This claims to be a meta-build system that allows generating everything needed to build with a variety of other build systems.
On windows it requires a gcc compliant compiler to be installed. I decided to go down the mingw path. So if you want to build from the commandline with a Windows system, be sure to install that first and to add the bin directory of that to your systems PATH. (http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download)

Right now the module is not directly integrated to be automatically built with the rest of the project. In order to build the C++ part, just change the directory into the “plc4cpp” directory and do a “mvn install” in there.

I would be really happy for some feedback, as this stuff is a lot more complicated to configure than in my normal Java world.
I hope I got everything right.

So … then I’ll wish you all happy testing ;-)


Chris