fstapi.c compile errors.
I get many errors like the following with Verilator 4.014 (and before) when compiling fstapi using mingw32 (under Linux):
verilator-4.014/include/gtkwave/fstapi.c:2752:46: error: expected ')' before 'PRIu32' elem_count_len = sprintf(elem_count_buf, "%" PRIu32, elem_count); ~ ^~~~~ ) ...
I've attached a patch file against verilatedos.h that fixes the problem in my environment (Fedora 29, mingw32-gcc-c++-8.3.0-2.fc29.x86_6).
#1 Updated by Wilson Snyder 6 months ago
- Status changed from New to AskedReporter
- Assignee set to Richard Myers
Thanks for debugging.
_WORDSIZE is defined in sys/types.h and your patch moves the test above this include, so I think this is likely to break for other compilers. Perhaps the VL_PRI64 needs to remain where it was, and only the USE_MINW_ANSI_STDIO and STDC_FORMAT_MACROS move up?
Also, just one time, please either edit the (new) docs/CONTRIBUTORS file to add your name and put that in the patch, or just post "I certify my contribution as described in https://developercertificate.org", to certify your contribution. Thanks.
Also available in: Atom