Hello,
I would like to use the High Performance OPC UA Server SDK, in a server written in C++ code, where for sure I will call c functions from SDK. I would like also in this C++ server (based on the lesson asynch data) use the STL Library (for string and vector classes notably). Unofrtunatly I'm not familiar with CMake generation. Do you have some samples that could help me ? Or explanations given in this forum.
Thanks a lot.
Best regards
Generation of a server based on example with C++ code
Moderator: uasdkhpc
-
- Jr. Member
- Posts: 1
- Joined: 19 Dec 2017, 11:38
- Support Team
- Hero Member
- Posts: 3072
- Joined: 18 Mar 2011, 15:09
Re: Generation of a server based on example with C++ code
Hello,
you can always linke C libraries to C++ applications.
The include of C files you should wrap into
so that the calling convention is right.
you can always linke C libraries to C++ applications.
The include of C files you should wrap into
Code: Select all
extern "C" { #include ... }
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Jr. Member
- Posts: 3
- Joined: 14 May 2018, 10:27
Re: Generation of a server based on example with C++ code
Hello
I also tried to build c++ code.
I used extern "C", but it still exists errors in header files, for example:
include/util/pointerset.h:73:26: error: invalid conversion from ‘void*’ to ‘void**’
I guess the syntax work in C, but not work in C++.
Should I fix these errors in the header files?
Or there are other solutions?
Best regards
I also tried to build c++ code.
I used extern "C", but it still exists errors in header files, for example:
include/util/pointerset.h:73:26: error: invalid conversion from ‘void*’ to ‘void**’
I guess the syntax work in C, but not work in C++.
Should I fix these errors in the header files?
Or there are other solutions?
Best regards