I tried your C++ SDK client examples and they worked quite well.
But when I create a new empty project, load the "callback.h" and "client_cpp_sdk_tutorial.cpp" from lesson 2, add the include/library directories and the preprocessor defines... I get compiler errors:
c:programmeunifiedautomationuasdkcppbundleevalincludeuaclientuaclientsdk.h(31) :
fatal error C1083: Datei (Include) kann nicht geöffnet werden: "uapkiconfig.h":
No such file or directory
So I also add "uapki" to the include directories but then I get a ton of errors:
You wrote that you added all include folders and all libraries, but have you also added the OS dependend libraries? The png you sent, indicates that there are some missing libraries.
All libraries you need are listed below (the 'd' indicates debug):
- Rpcrt4.lib, ws2_32.lib, crypt32.lib, libeay32(d).lib, uaclient(d).lib, uabase(d).lib, uastack(d).lib, uapki(d).lib
The associated library folders are:
- third-party/win32/vs2008sp1/openssl/out32dll (or for debug: third-party/win32/vs2008sp1/openssl/out32dll.dbg), lib
Also add all important preprocessor defines:
- _CRT_SECURE_NO_WARNINGS, _CRT_SECURE_NO_DEPRACATE, _UA_STACK_USE_DLL, OPCUA_SUPPORT_SECURITYPOLICY_BASIC128RSA15=1, OPCUA_SUPPORT_SECURITYPOLICY_BASIC256=1, OPCUA_SUPPORT_SECURITYPOLICY_NONE=1, OPCUA_SUPPORT_PKI=1
The important include folders are:
- sdk/third-party/win32/vs2008sp1/openssl/inc32, sdk/include/uastack, sdk/include/uabase, sdk/include/uaclient, sdk/include/uapki
This all should help you to get a working VS Solution.
I found out that there are some errors regarding the documentation:
1. It is neccassary to add crypt32.lib and uapkid.lib to additional dependencies in Linker Settings -> Input.
They're missing in the documentation
2. The entry uaclientcpp.lib in linker settings is wrong! It cannot be found. But you have to add uaclientd.lib
3. You also have to copy uastackd.dll and libeay32d.dll from bin folder to your output folder