Generation of a server based on example with C++ code

Questions regarding the use of the High Perfomance SDK for Server development

Moderator: uasdkhpc

Post Reply
LChevalier
Jr. Member
Jr. Member
Posts: 1
Joined: 19 Dec 2017, 11:38

Generation of a server based on example with C++ code

Post by LChevalier »

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

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: Generation of a server based on example with C++ code

Post by Support Team »

Hello,

you can always linke C libraries to C++ applications.
The include of C files you should wrap into

Code: Select all

extern "C" { #include ... }
so that the calling convention is right.
Best regards
Unified Automation Support Team

RichLiao
Jr. Member
Jr. Member
Posts: 3
Joined: 14 May 2018, 10:27

Re: Generation of a server based on example with C++ code

Post by RichLiao »

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

Post Reply