open62541 library build on Windows differents with release files

I trying to go into the open62541 project to use it in my solution. My platform is windows.

At first, I downloaded the release files (open62541.h/c) and compiled the server example with GCC compiler (MinGW64).

$ gcc -std=c99 open62541.c myServer.c -l"ws2_32" -o myServer

That works. So my following step was to get the newest master from GitHub, and build it with CMAKE. I used the following CMAKE configuration:

CMAKE configuration

UA_NAMESPACE_ZERO Reduced is used due to FULL will cause CAMKE to fail generate project:

CMake Error at CMakeLists.txt:1156 (message): File C:/Users/lukasz/Desktop/open62541-visual/deps/ua-nodeset/Schema/Opc.Ua.NodeSet2.xml not found. You probably need to initialize the git submodule for deps/ua-nodeset or set open62541_NODESET_DIR.

That will create a .sln, and simple build all creates open62541.h/c. When I try to compile the example with generated files I got this error:

> $ gcc -std=c99 open62541.c myServer.c -l"ws2_32" -o myServer
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> C:\msys64\tmp\ccs27GQ8.o:myServer.c:(.text+0xa3): undefined reference
> to `__imp_UA_ServerConfig_setMinimalCustomBuffer'
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> C:\msys64\tmp\ccs27GQ8.o:myServer.c:(.text+0xe3): undefined reference
> to `__imp_UA_Log_Stdout'
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> C:\msys64\tmp\ccs27GQ8.o:myServer.c:(.text+0x13e): undefined reference
> to `__imp_UA_Server_new'
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> C:\msys64\tmp\ccs27GQ8.o:myServer.c:(.text+0x152): undefined reference
> to `__imp_UA_Server_getConfig'
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> C:\msys64\tmp\ccs27GQ8.o:myServer.c:(.text+0x171): undefined reference
> to `__imp_UA_Server_run'
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> C:\msys64\tmp\ccs27GQ8.o:myServer.c:(.text+0x184): undefined reference
> to `__imp_UA_Server_delete' collect2.exe: error: ld returned 1 exit
> status

What causes that difference to released files?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum