Hi Markus,

I manually set the variables in clion and was able to build. But as the path 
now no longer contains any version information, we should be fine.

When I first tried it, cmake wouldn't accept the values of I specified them in 
the CMakeLists.txt file, but I explicitly read it in the documentation so it 
might have been a bug and works now.

I'll try that out as soon as I'm in the office. And I agree, it helps setting 
things up a lot.

Chris

Holen Sie sichOutlook für Android<https://aka.ms/ghei36>

________________________________
From: Markus Sommer <[email protected]>
Sent: Wednesday, July 10, 2019 8:24:17 AM
To: [email protected]
Subject: AW: [C++] Status Update?

Hi Chris,

creating with Maven works very well.

I noticed the following points:

1. How can I select the compilers (Visual C++ or gcc) for Maven?
2. The variables BOOST_INCLUDEDIR and BOOST_LIBRARYDIR are passed by maven. If 
plc4cpp is compiled in a development environment like CLion, the value of the 
variables is missing and the driver cannot be created.

Should we clean up a query in CMake and set it locally?

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: Dienstag, 9. Juli 2019 21:41
An: [email protected]
Betreff: Re: [C++] Status Update?

Yup ... my latest commit fixed the problem.

Guess you can concentrate on making the code compile for linux and mac (

Chris



Am 09.07.19, 21:32 schrieb "Christofer Dutz" <[email protected]>:

    Think I fixed it ... was missing a linker assignment in the CMakeList.txt

    Chris

    Am 09.07.19, 17:27 schrieb "Markus Sommer" <[email protected]>:

        Hello, Chris,

        Thank you so much for your great work.

        I'm checking out the LinkerError tonight.

        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: Dienstag, 9. Juli 2019 16:59
        An: [email protected]
        Betreff: Re: [C++] Status Update?

        Hi Markus,

        Ok so I fixed another few things that weren't working correctly. It 
wasn't correctly finding the boost libraries as it wan't setting the arch to 
x64 correctly. Now it's finding the libraries and manages to compile everything 
and also to almost finish linking.

        Now it builds to 97% and then fails when linking the s7.dll ... 
complaining about undefined references to mainly the constructors and 
destructors of ExLog and finally dies because of an "bad reloc address 0x0 in 
`.data'"

        Now I'm really starting to feel lost ... hopefully you'll manage to 
sort this out ... otherwise I'll try continuing tomorrow.

        Chris

        Am 09.07.19, 15:11 schrieb "Christofer Dutz" 
<[email protected]>:

            No need to look,

            just update ... I had a look and noticed the declspec needed two 
underscores ... as soon as I fixed that compilation passes on my windows VM.
            However the linking seems to fail. As far as I got it from my 
google-foo ... it seem that the winsock library needs to be linked in 
differently for gcc as wich the visual c++ compiler.

            Will investigate....

            Chris



            Am 09.07.19, 14:12 schrieb "Markus Sommer" <[email protected]>:

                Hi Chris,

                it looks like there's a problem with _declspec. It's probably 
nothing big.

                Unfortunately I won't be able to look it up until tonight.

                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: Dienstag, 9. Juli 2019 13:56
                An: [email protected]
                Betreff: Re: [C++] Status Update?

                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