You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use make to build the program, and found this problem:
$ make
cc -o kilo kilo.c -Wall -W -pedantic -std=c99
kilo.c: In function‘editorUpdateRow’:
kilo.c:567:21: error: ‘UINT32_MAX’ undeclared (first use in this function); did you mean ‘__UINT32_MAX__’?if (allocsize > UINT32_MAX) {
^~~~~~~~~~
__UINT32_MAX__
kilo.c:567:21: note: each undeclared identifier is reported only once foreach function it appearsin
Makefile:4: recipe for target 'kilo' failed
make: *** [kilo] Error 1
My environment:
$ uname -a
Linux beaglebone 4.9.78-ti-r94 #1 SMP PREEMPT Fri Jan 26 21:26:24 UTC 2018 armv7l GNU/Linux
How I fix it ?
Just include <stdint.h> and the program compiled correctly with no errors.
Test kilo on MacOS
I found no erorr when compiling.
And my environment on MacOS is:
$ uname -a
Darwin unknowntpo.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered:
unknowntpo
changed the title
UINT32_MAX’ undeclared problem in Linux
‘UINT32_MAX’ undeclared problem in Linux
Jul 5, 2020
Problems: UINT32_MAX’ undeclared problem in Linux
Why I post this issue?
I use make to build the program, and found this problem:
My environment:
$ uname -a Linux beaglebone 4.9.78-ti-r94 #1 SMP PREEMPT Fri Jan 26 21:26:24 UTC 2018 armv7l GNU/Linux
How I fix it ?
Just include
<stdint.h>
and the program compiled correctly with no errors.Test
kilo
on MacOSI found no erorr when compiling.
And my environment on MacOS is:
$ uname -a Darwin unknowntpo.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered: