1
votes

I would like to build the QT Opc Ua Plugin for QT 5.13.2 with the security patch for the Open62541 library.

So far I managed to install the mbedTLS library and it gets recognized in the qmake step prior to nmake. Nmake then runs into a problem:

mbedcrypto.lib(entropy_poll.obj) : error LNK2019: unresolved external symbol __imp__CryptAcquireContextA@20 referenced in function _mbedtls_platform_entropy_poll

As far as I understand the issue, this is because my linker? doesnt find the library in which those functions are located, which would be advApi32.lib

Although there are many tutorials as to how to include this library with Visual Studio or with Qt Creator, i need to do this from the command line (or by manipulating dome files in the QtOpcUa directory), how would this be possible ?

I already tried adding LIBS += -ladvAPI32 to all the .pro files I could find, but it did not help at all.

2

2 Answers

2
votes

I fixed it by adding AdvAPI32.lib to the win32: part of the open62541.pri file. I don't know why it's expected at this place, but I'm happy it works now.

1
votes

This seems like a path issue. In the qtopcua.pro file, you can try adding the absolute path of the advapi32 library using 'LIBS +=' option and then run qmake.