Can't build examples, unresolved external symbol "EVP_PKEY_id"

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

Moderator: uasdkhpc

Post Reply
tim.starke
Jr. Member
Jr. Member
Posts: 4
Joined: 01 Dec 2022, 14:17

Can't build examples, unresolved external symbol "EVP_PKEY_id"

Post by tim.starke »

Hi,
I want to test the evaluation version and followed the instructions till the point, where I should build the project.
I get this Error Message in Visual Studio:
Errorcode: LNK2019
Description: unresolved external symbol EVP_PKEY_id referenced in function pki_cert_get_public_key
Project: uaserver_collection
file: D:\..\uasdkhpbundle_pubsub-1.6.1-eval-beta\bldExamples\examples\server_collection\hpsdk_uapkid.lib(cert.c.obj)

I tried both methods for Windows (Visual Studio project and CMake GUI; Visual Studio and Ninja) and I still get this error.

Do I need any files for it to work or how can I fix this?

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

Re: Can't build examples, unresolved external symbol "EVP_PKEY_id"

Post by Support Team »

Hi,

hard to say what goes wrong here. The HighPerf-SDK requires OpenSSL being installed on your computer, the setup/installation requirements remind you for installing before compiling examples. Alternatively you could switch off security completely (but that makes not much sense when doing OPC UA)

Please check for OpenSSL and use correct version of OpenSSL. The delivered CMake files will find OpenSSL when present on your host.
Best regards
Unified Automation Support Team

tim.starke
Jr. Member
Jr. Member
Posts: 4
Joined: 01 Dec 2022, 14:17

Re: Can't build examples, unresolved external symbol "EVP_PKEY_id"

Post by tim.starke »

OpenSSL is installed. When I started I had the message from CMake reminding me to install it. I cmaked the whole project without any errors.
But where can I find the version number of OpenSSL that is needed for my SDK to work?

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

Re: Can't build examples, unresolved external symbol "EVP_PKEY_id"

Post by Support Team »

Hi,

the HighPerf SDK supports a range of OpenSSL. The EVP_PKEY exist from v1.0.1 and bigger. So if you use current long term v1.1.1 or even the new v3.0, you will be good and HighPerf SDK can be operated with either one.
Best regards
Unified Automation Support Team

tim.starke
Jr. Member
Jr. Member
Posts: 4
Joined: 01 Dec 2022, 14:17

Re: Can't build examples, unresolved external symbol "EVP_PKEY_id"

Post by tim.starke »

I found my mistake for this problem. I cmaked the project for x64. Corrected it and cmaked it for x86 (even though my system is x64).
But I still get a error messages from the linker. When I try to build an example I get about 50 Linker Error Messages about unresolved external symbols.
Example:
Building Examples/client_read
56 Errors in main.obj, readclient.obj, future.obj, client_utilities.obj.
I deleted them and cmaked them new, but that didn't changed anything
Screenshot form VS Studio
https://imgur.com/a/Hl9S2lc (can recommend zooming in for better readability)

tim.starke
Jr. Member
Jr. Member
Posts: 4
Joined: 01 Dec 2022, 14:17

Re: Can't build examples, unresolved external symbol "EVP_PKEY_id"

Post by tim.starke »

Ok, I found a solution to my problem. The instructions said, that I should cmake it for win32 and also to use OpenSSL32Bit. I tried it with the x64 version, as my system is also x64. Now it's working.
So there is a slight mistake in the instructions, telling you to choose "Win32" as architecture.

Post Reply