clibs / cmocka

An elegant unit testing framework for C with support for mock objects.
Apache License 2.0
227 stars 55 forks source link

/usr/local/include/cmocka.h:2064:1: error: unknown type name ‘uintmax_t #18

Closed itercheng closed 3 years ago

itercheng commented 3 years ago

Dear cmocka expert: because some tools depend on "cmocka" dependency in my environment, After installing cmocka tool, when i try to compile my build again, the error is shown as title. Could you help me solving this issue? thank you in advance.

jwerle commented 3 years ago

Have you included <stdint.h> in your project?

itercheng commented 3 years ago

okay. Thank you for quick reply. the reason is that this head file was commented in /usr/local/include/cmocka.h. it can work well till they are opened. Thank you very much

vim /usr/local/include/cmocka.h /* 42 @defgroup cmocka The CMocka API 43 44 These headers or their equivalents MUST be included prior to including 45 this header file. 46 @code 47 #include 48 #include 49 #include 50 #include 51 #include 52 @endcode 53 54 This allows test applications to use custom definitions of C standard 55 library functions and types. 56 57 * @{