plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <>
Subject Re: Update to the C++ Module
Date Thu, 03 Jan 2019 14:10:18 GMT
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

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.


Am 28.12.18, 14:04 schrieb "Christofer Dutz" <>:

    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 ...
    Am 28.12.18, 11:29 schrieb "Markus Sommer" <>:
        Hi all,
        @ Chris: Thank you for the good work on Christmas.
        A few words to Boost ( 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
        According to the current state, we would like to follow the Java API and thus reduce
the maintenance hell.
        Best regards, happy new year.
        Mit freundlichen Grüßen
        Markus Sommer
        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
        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 <> 
        Gesendet: Donnerstag, 27. Dezember 2018 16:37
        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”
        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
        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. (
        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 ;-)

View raw message