Open HpLightcorner opened 3 years ago
Found the issue... An include-statement was missing... I had to add #include <inttypes.h>
to asn_system.h
.
However, I fail to link with errors coming from GeneralizedTime.c
.
There are a lot of preprocessor-defines present to distinguish between platforms, so I got the following questions now:
setenv
and unsetenv
, both seem to be missing on MSYS2/OMneT++ Windows environment. Any suggestions?Quite hard to find the missing link without fully understanding the code. Also, I assume that I can Ingnore all those warnings like _localtimer is implemented via localtime(), which may be not thread-safe?
I also think it is "safe" to ignore the warnings about thread safety.
The ASN.1 code is either generated by asn1c or skeleton code provided by asn1c, i.e. manual changes are likely to get overwritten at some point. If changes are necessary, I have to incorporate them into CMake to always get properly patched generated code.
Honestly speaking, I don't know if there are differences between CYGWIN and MINGW32.
Regarding the setenv
and unsetenv
issue: This code is not actively used by Vanetza. Any stub implementation doing nothing would be an acceptable workaround from my point of view.
Hmm, fixing hat in CMake is then for sure necessary. I will focus a few days on getting the CMake Package down before patching Vanzeta for Windows Builds adding stub implementation, but that should be an easy fix.
Hi @HpLightcorner,
I have some other issues building Vanetza on Windows. I am using MSVC, so you probably do not know, but as you also attempted this, did you by any chance come across similar issue? I have problems with CryptoPP library. https://github.com/riebl/vanetza/issues/169
Thanks, Karel
For Windows builds, I would try to use Conan for the build process. Handling all the library dependencies manually on Windows is no fun at all.
Hi @riebl, Linked to our discussion: https://github.com/riebl/artery/issues/184
I am currently building Vanetza on Windows, I finally got everything to build except ASN1: https://github.com/riebl/vanetza/blob/15de29825e6e8c3f6a1a88c06e1a755e127ef657/vanetza/asn1/support/INTEGER.c#L114
It fails with:
It seems like a preprocessor error? If I got it right, this should somehow be replaced to the correct formatting-string:
"%" ASN_PRIdMAX " (%s)"
- for this example this should be:%i (%s)
- right?