Menu

#903 Unknown type errors in bcrypt.h

v1.0 (example)
open
nobody
None
5
2021-06-15
2021-06-15
No

bcrypt.h omits windows.h, but makes use of Windows data types (LONG, ULONG, etc). This results in a build failure if the external program doesn't include windows.h first:

// i686-w64-mingw32-gcc -c bug.c
#include "bcrypt.h"
bcrypt.h:27:11: error: unknown type name 'LONG'
   27 |   typedef LONG NTSTATUS,*PNTSTATUS;
      |           ^~~~
...

Discussion


Log in to post a comment.

MongoDB Logo MongoDB