Good morning,
I downloaded the latest version of UaStack SDK (1.8.6-641), and a precompiled version of OpenSSL 1.1.1w, finally when compiling with VS2015 a lot of OpenSSL defines are undefined generates me a lot of errors.
There are the steps I made:
unzipped SDK in the main root C:\uasdkcppbundle-src-windows-1.8.6-641
unzipped the OpenSSL precompiled package in the folder "C:\uasdkcppbundle-src-windows-1.8.8-641\third-party\win32\vs2015\openssl"
using cmake 3.28.1 I made a new build for VS2015, following instructions from https://documentation.unified-automation.com/uasdkcpp/1.8.6/html/CompileSdkVS.html
then I open the VS2015 solution and make INSTALL build
CMake Warning (dev) at CMakeLists.txt:1 (project):
cmake_minimum_required() should be called prior to this top-level project() call. Please see the cmake-commands(7) manual for usage documentation of both commands. This warning is for project developers. Use -Wno-dev to suppress it.
######################### Creating Makefile of uasdk_src ###########################################
Detected MSVC version: 19.0.24215.1
######################### Creating Makefile of uastack #############################################
### General settings
UASTACK_PLATFORM win32_v6
UASTACK_WITH_OPENSSL ON
UASTACK_WITH_HTTPS OFF
UASTACK_WITH_HTTP_GET OFF
UASTACK_HAVE_THREADS ON
UASTACK_USE_THREADS ON
UASTACK_USE_SYNCHRONIZATION ON
UASTACK_USE_TRACE_RAW ON
UASTACK_GUID_STRING_USE_CURLYBRACE ON
UASTACK_ENABLE_KEYLOGGING OFF
### Build settings
BUILD_SHARED_STACK ON
UASTACK_SUPPORT_ENC_OBJ_EXTENSIONS ON
UASTACK_DISABLE_PUBSUBCONFIGURATIONREFTYPES OFF
UASTACK_STATIC_PLATFORM ON
UASTACK_CLIENTAPI_ENABLED ON
UASTACK_SERVERAPI_ENABLED ON
### Minimal options
UASTACK_MINIMAL_OMIT_TYPE_NAME OFF
UASTACK_MINIMAL_SMALL_VARIANT OFF
UASTACK_MINIMAL_SMALL_DATAVALUE OFF
UASTACK_MINIMAL_DISABLE_TRACE OFF
### Security settings
UASTACK_SUPPORT_SECURITYPOLICY_NONE ON
UASTACK_SUPPORT_SECURITYPOLICY_BASIC128RSA15 ON
UASTACK_SUPPORT_SECURITYPOLICY_BASIC256 ON
UASTACK_SUPPORT_SECURITYPOLICY_BASIC256SHA256 ON
UASTACK_SUPPORT_SECURITYPOLICY_AES128SHA256RSAOAEPOFF
UASTACK_SUPPORT_SECURITYPOLICY_AES256SHA256RSAPSS OFF
UASTACK_WITH_TLS OFF
UASTACK_WITH_PKI_WIN32 OFF
UASTACK_OPENSSL_API_MAJOR 1
UASTACK_OPENSSL_API_MINOR 1
### Advanced settings
UASTACK_TCPLISTENER_MAX_CONNECTIONS 102
UASTACK_NUMBER_OF_AVAILABLE_TIMERS 200
UASTACK_SOCKETMANAGER_NUMBER_OF_SOCKETS 105
UASTACK_ASYNC_OPENSECURECHANNEL ON
######################### Creating Makefile of uabasecpp ###########################################
######################### Creating Makefile of uapkicpp ############################################
######################### Creating Makefile of xmlparsercpp ########################################
######################### Creating Makefile of uaclientcpp #########################################
######################### Creating Makefile of coremodule ##########################################
######################### Creating Makefile of uamodule ############################################
######################### Creating Makefile of uamodels ############################################
######################### Project Configuration Summary ############################################
UaOpenSSL found (1.1.1w)
LibXml2 found (2.13.5)
CMAKE_BUILD_TYPE Not defined
### Product to build
### Modules to build
BUILD_UAPKICPP ON
UASDK_WITH_XMLPARSER ON
BUILD_UACLIENTCPP ON
BUILD_UASERVERCPP ON
BUILD_UAMODULE ON
BUILD_UAMODELS ON
### Options to build
BUILD_TESTING Not defined
BUILD_SHARED_LIBS ON
### End of Summary
Configuring done (0.3s)
the CMake output seems to be fine, the (rather simple) logic detects the v1.1.1w in the search location. Even though not understand why you switch off the good security policies, the configuration generally looks good.
The OpenSSL that you have precompiled and unziped to the target folder, where did you get that from? It seems that essential parts are missing, which cause the compiler errors.
the CMake output seems to be fine, the (rather simple) logic detects the v1.1.1w in the search location. Even though not understand why you switch off the good security policies, the configuration generally looks good.
I haven't touched any cmake options in general, except the BUILD_SHARED_LIBS and CMAKE_INSTALL_PREFIX options.. but I can enabled this option you mentioned.
It seems that essential parts are missing, which cause the compiler errors.
I also think that this is the problem because without OPEN_SSL enabled everything compiles correctly
Can you provide me with a valid link for a precompiled 1.1.1 win32 version?
the OpenSSL has several deprecated APIs. To gain backward compatibility (down to 0.9.8) there are some macros mapping names. It seems that the "FireDaemon" has provided the pre-compiled binaries without having the backward compatibility switched on.
For that reason you are getting compiler errors (the header files have been found, which is good), but the backward compatibility macros have not been activated, which gives the compiler errors.
Now there are 3 options for you to move forward.
1) use OpenSSL v3.0.x instead (using the newer APIs in OpenSSL)
2) compile the OpenSSL v1.1.1 from source (and switch on deprecated API, to get the macros activated)
3) ask the FireDaemon for new binary edition with backward compatibility switched "on"
Note: there is another 4. option, using the old macros in our stack code, by modifying the conditional version <=3.0 define, but that would not be recommended (and overwritten with next SDK update). My recomendation would be using option 1) because putting efforts in fixing macros in EoL crypto lib, makes no sense.