Hi Markus,

Seems I have had progress. 
After noticing that I need a newer version of CMake in order to get real Boost 
1.70 support, it took a while to get things running, but now it seems that it's 
mostly working.
However almost at the end I'm getting this error, which I have absolutely no 
idea to what it means and if something's wrong with the code or my build:

[ 94%] Building CXX object 
drivers/s7/CMakeFiles/plc4cpp-driver-s7.dir/src/main/cpp/org/apache/plc4x/cpp/s7/dllexports.cpp.obj
C:\Temp\plc4x\plc4cpp\drivers\s7\src\main\cpp\org\apache\plc4x\cpp\s7\dllexports.cpp:34:10:
 error: expected constructor, destructor, or type conversion before '(' token
 _declspec(dllexport) PlcDriver* _CreatePlcDriverInstance()
          ^
drivers\s7\CMakeFiles\plc4cpp-driver-s7.dir\build.make:62: recipe for target 
'drivers/s7/CMakeFiles/plc4cpp-driver-s7.dir/src/main/cpp/org/apache/plc4x/cpp/s7/dllexports.cpp.obj'
 failed
mingw32-make.exe[2]: *** 
[drivers/s7/CMakeFiles/plc4cpp-driver-s7.dir/src/main/cpp/org/apache/plc4x/cpp/s7/dllexports.cpp.obj]
 Error 1
CMakeFiles\Makefile2:256: recipe for target 
'drivers/s7/CMakeFiles/plc4cpp-driver-s7.dir/all' failed
mingw32-make.exe[1]: *** [drivers/s7/CMakeFiles/plc4cpp-driver-s7.dir/all] 
Error 2
Makefile:82: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

Chris



Am 08.07.19, 20:52 schrieb "Christofer Dutz" <[email protected]>:

    Ok,
    
    Think im taking down the root of the problems. At first I found out, no 
matter how I configured things, the build always used the installed version of 
boost. Now that I forced it to locally use it, it started failing. Today I 
found out that the version of cmake the plugin is using inbox supports boost 
till 1.63.0 and simply doesn't find newer versions. So I'm currently trying to 
update the build to use newer cmake version.
    
    Hope I'll fix that tomorrow as it didn't feel right working around the 
tooling.
    
    The more I work in this c++ environment, the more I feel a deep love for 
the Java ecosystem 😘
    
    So far the update...
    
    Chris
    
    Holen Sie sichOutlook für Android<https://aka.ms/ghei36>
    
    ________________________________
    From: Markus Sommer <[email protected]>
    Sent: Friday, July 5, 2019 3:38:03 PM
    To: [email protected]
    Subject: AW: [C++] Status Update?
    
    Hi Chris,
    
    many thanks for your work :-).
    
    Best regards
    
    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: [email protected]
    Web: www.isb-fn.de<http://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 <[email protected]>
    Gesendet: Freitag, 5. Juli 2019 15:04
    An: [email protected]
    Betreff: Re: [C++] Status Update?
    
    Hi Markus and others,
    
    I invested about a day in cleaning up the C++ build:
    - I removed all the other pom files and moved the boost build down to the 
root of the plc4cpp.
    - I added some missing file headers in two files
    - I managed to somehow get the build to work with regards to the boost 
include directories (Seems the cmake find_packages function doesn't correctly 
set)
    - I managed to force CMake to use the boost version we provide (It seems to 
have always found the installed version on my system and never used the one I 
wanted it to)
    - I managed to spot the bug that was causing build errors in the log module 
(Turned out it was simple usage of backslashes instead of forward slashes)
    
    Now it think the whole "Boost_INCLUDE_DIRS" thing doesn't seem to work on 
my machine. I am providing Environment variables as hints and cmake claims to 
have found the directoeis but in contrast ot the documentation the variable 
"Boost_INCLUDE_DIRS" is never defined.
    I changed the CMakeLists.txt to reference another Environment variable 
"BOOST_INCLUDEDIR" which seems to work, but you might have to ensure to provide 
it too.
    
    Chris
    
    Am 04.07.19, 16:49 schrieb "Markus Sommer" <[email protected]>:
    
        Hello, Chris,
    
        I've already seen the MAVEN always fetches the current state of Boost, 
which is a problem when changing interfaces.
    
        Here we have to download a defined version of Boost when loading Boost 
from Maven and then CMAKE finds the Boost Library and can set the variables 
correctly.
    
        Currently, setting the variables for Boost is set in the parent CMAKE 
and all sub CMAKE then use the variables.
    
        Best Regards
    
        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: [email protected]
        Web: www.isb-fn.de<http://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 <[email protected]>
        Gesendet: Donnerstag, 4. Juli 2019 16:38
        An: [email protected]
        Betreff: Re: [C++] Status Update?
    
        Hi Markus,
    
        I just pulled your latest changes, uncommented the parts that will not 
compile on Mac / Linux and am currently working on the build / maven stuff.
        I did change that I pulled the boost stuff down to the root and updated 
the BOOST_ROOT to:
        set(BOOST_ROOT "./target/boost_1_70_0/")
    
        Most seems to be working with this ... but still the logger module is 
complaining to not be able to find the boost includes ... I'm currently trying 
to find out what's wrong there.
    
        Regarding the loading of modules ... doesn't boost have some 
abstraction for this? I thought Boost is there to abstract from exactly these 
types of differences between the OSes.
    
        Chris
    
    
        Am 04.07.19, 16:19 schrieb "Markus Sommer" <[email protected]>:
    
            Hey Chris,
    
            Meanwhile a S7.dll can already be created for Windows and with the 
example hello plc4x we can successfully link DLL into the exe. Auf Basis das 
Connectiontyps S7, ModBus, etc. wird die DLL dynamisch nachgeladen. The 
connection is implemented.
    
            The next steps are:
            Generation via Maven/CMAKE
            Reporting telegrams to the reassigned levels vie Signal2
            Implementation of telegrams with new procedure of automatic 
generation
    
            Currently, however, the driver can only be compiled with CMAKE 
under Windows. Why? The interface for loading the DLL is different between 
Windows and Linux. As part of the Maven customizations, we would also make the 
customizations for Linux.
    
            So far we have created the CMAKE files for creating the PLC4CPP 
driver. We haven't deleted the Maven parts yet.
    
            This would be the procedure for generating the complete driver:
            Starting the BOOST Library generation process via Maven(as now)
            Start Plc4x CMAKE process via MAVEN
    
            We haven't done that much with Maven yet, we still have to get used 
to it. Chris might be able to do the integration in a Telko.
    
            Best regards
    
            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: [email protected]
            Web: www.isb-fn.de<http://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 <[email protected]>
            Gesendet: Donnerstag, 4. Juli 2019 15:28
            An: [email protected]
            Betreff: [C++] Status Update?
    
            Hi All and especially Markus,
    
            I just wanted to hear what the C++ part is up to. I can see a 
commit every now and then in the s7-cpp branch, but not much discussion 
(Actually none at all).
            Would be cool, if you could give us all an update to what you’re up 
to.
    
            Also would I like to tackle the problem of being able to fully 
build C++ from the maven build.
            We had discussed the options a while ago, but nothing has happened 
so far.
    
            I think the way I understood our last state we decided to:
    
              *   Get rid of all the intermediate pom.xml files and all the 
Maven packing and unpackeing of stuff
              *   Concentrate fully on starting one CMake build in the plc4cpp 
root pom and have that build all modules
              *   We do the packaging using the maven assembly plugin which is 
also defined in the plc4cpp module
    
            So I have a few questions:
    
              *   How do we integrate the downloading and building of boost in 
this szenario?
                 *   Do we simply copy the boos build stuff to execute before 
running the CMake build in the plc4cpp module?
                 *   Do we add something to the CMake build that takes care of 
this?
              *   Currently can’t come up with the second question ;-)
    
            Chris
    
    
    
    
    
    
    

Reply via email to