0

I have a problem when I try to compile Qt OPCUA on windows with open62541.

I am following this tutorial (Building On Windows - Mingw32)

I cannot seem to specify the path to the header open62541.h and the lib open62541.a even if I did

set QTOPCUA_OPEN62541_INCLUDE_PATH=c:\path\to\open62541\build
set QTOPCUA_OPEN62541_LIB_PATH=c:\path\to\open62541\build\bin

Note that open62541 is compiled and that I do have the files open62541.h and libopen62541.a (in version 0.3) where they should be.

The error I get is a linker problem : cannot find -lopen62541

I added manually the open62541.h to the project files since it was not working either.

What should I do to specify correctly the path to open62541 please ? Is there an up-to-date documentation ?

ElevenJune
  • 423
  • 1
  • 4
  • 21

1 Answers1

0

You need to add the path where libopen62541.a is to the library path directory.

If you are using QMake, you need to specify add it to the LIBS variable prepending the path with a -L as follows:

LIBS += -L$${PATH_WHERE_LIB_FILE_IS}

Take a look on how is done in the QUaServer project.

If you are using CMake, then take a look at this answer on how to add to the library path directory.

What you are doing with those commands is telling the linker where to find the missing libraries.