Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to build v1.4 with gcc/mingw #6423

Open
FabienDekeyser opened this issue Apr 19, 2024 · 1 comment
Open

Failure to build v1.4 with gcc/mingw #6423

FabienDekeyser opened this issue Apr 19, 2024 · 1 comment

Comments

@FabienDekeyser
Copy link

Failure to build open62541 v1.4.0 with gcc version 13.2.0 (Rev6, Built by MSYS2 project) on windows architecture.

error message
In function 'UA_ByteString_memZero':
open62541/src/ua_util.c:543:4: error: implicit declaration of function 'SecureZeroMemory' [-Werror=implicit-function-declaration]
543 | SecureZeroMemory(bs->data, bs->length);
| ^~~~~~~~~~~~~~~~
open62541/src/ua_util.c:543:4: error: nested extern declaration of 'SecureZeroMemory' [-Werror=nested-externs]
At top level:
cc1.exe: note: unrecognized command-line option '-Wno-static-in-inline' may have been intended to silence earlier diagnostics
cc1.exe: all warnings being treated as errors

I used the following options
cmake -DCMAKE_INSTALL_PREFIX=/home/user/install -DCMAKE_BUILD_TYPE=Release -DUA_NAMESPACE_ZERO=REDUCED -DUA_MULTITHREADING=0 -DUA_ENABLE_AMALGAMATION=0 ..

Compilations on v1.3.10 works well with my settings.

@FabienDekeyser FabienDekeyser changed the title Failure to build with gcc/mingw Failure to build v1.4 with gcc/mingw Apr 19, 2024
@RolfKal
Copy link
Contributor

RolfKal commented Apr 22, 2024

SecureZeroMemory() is a Windows base function, normally declared in WinBase.h, which is automatically included when including Windows.h.
https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa366877(v=vs.85)

Your gcc/MingW installation seems not to provide this definition in its Windows SDK headers or you did not install a Windows SDK to be used with MingW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants