-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Compile issue on Windows with Mingw on Open62541 version >=1.4.0 #6755
Comments
After investigation, it seems that |
I try to build lastest version on my windows with mingw32. Get |
@CHN-STUDENT But looking at your log, it really sounds like what mentioned maleadt on this github thread: Please check your gcc version, and try using version 12: |
@g-tardy hey,glad to get your help, at last, i build it by using mingw11.2, now it work normally, thanks! |
Description
I was not able to compile correctly Open62541 on MingW64 under Windows. This starting with Open62541 version 1.4.0
Background Information / Reproduction Steps
The compile error does not occur on Open62541 version < 1.4.0
Notes for cmake options: I compiled mbdetls in a specific subfolder to avoid having it installed on dev machine.
I had to
Used CMake options:
-G "MinGW Makefiles"
-D CMAKE_BUILD_TYPE=Release
-DBUILD_SHARED_LIBS=ON
-DOPEN62541_VERSION="v1.4.5"
-DUA_ENABLE_ENCRYPTION=MBEDTLS -DMBEDTLS_INCLUDE_DIRS="..\mbedtls\include"
-DMBEDTLS_LIBRARY="..\mbedtls\build\library\libmbedtls.a"
-DMBEDX509_LIBRARY="..\mbedtls\build\library\libmbedx509.a"
-DMBEDCRYPTO_LIBRARY="..\mbedtls\build\library\libmbedcrypto.a"
Error output:
Correction found:
To bypass the compile issue, I had to include the following CMake option:
-DCMAKE_C_FLAGS="-D_WIN32_WINNT=0x0600"
This may be helpful to anyone who encountered the same issue as me...
Code suggestion:
It may be good to include the following code (or equivalent) in the
config.h.in
:Checklist
Please provide the following information:
UA_LOGLEVEL
set as low as necessary) attachedThe text was updated successfully, but these errors were encountered: