Skip to content

Fix missing cstdint include causing build failure#2

Open
snigdhkarki wants to merge 1 commit into
TENNLab-UTK:mainfrom
snigdhkarki:patch-1
Open

Fix missing cstdint include causing build failure#2
snigdhkarki wants to merge 1 commit into
TENNLab-UTK:mainfrom
snigdhkarki:patch-1

Conversation

@snigdhkarki

Copy link
Copy Markdown

src/event_viz.cpp uses uint8_t but dosent includes . Build fails on Linux Mint with the following error:

src/event_viz.cpp: In function ‘int main(int, char**)’:
src/event_viz.cpp:66:3: error: ‘uint8_t’ was not declared in this scope
   66 |   uint8_t* pixels = (uint8_t*)malloc(img_sz);
      |   ^~~~~~~
src/event_viz.cpp:12:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   11 | #include <sys/wait.h>
  +++ |+#include <cstdint>
   12 |
src/event_viz.cpp:66:12: error: ‘pixels’ was not declared in this scope
   66 |   uint8_t* pixels = (uint8_t*)malloc(img_sz);
      |            ^~~~~~
src/event_viz.cpp:66:30: error: expected primary-expression before ‘)’ token
   66 |   uint8_t* pixels = (uint8_t*)malloc(img_sz);
      |                              ^
src/event_viz.cpp:67:12: error: ‘pixel’ was not declared in this scope
   67 |   uint8_t *pixel;
      |            ^~~~~
make: *** [makefile:83: bin/event_viz] Error 1

src/event_viz.cpp uses uint8_t but dosent includes <cstdint>. Build fails on Linux Mint with the following error:

```src/event_viz.cpp: In function ‘int main(int, char**)’:
src/event_viz.cpp:66:3: error: ‘uint8_t’ was not declared in this scope
   66 |   uint8_t* pixels = (uint8_t*)malloc(img_sz);
      |   ^~~~~~~
src/event_viz.cpp:12:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   11 | #include <sys/wait.h>
  +++ |+#include <cstdint>
   12 |
src/event_viz.cpp:66:12: error: ‘pixels’ was not declared in this scope
   66 |   uint8_t* pixels = (uint8_t*)malloc(img_sz);
      |            ^~~~~~
src/event_viz.cpp:66:30: error: expected primary-expression before ‘)’ token
   66 |   uint8_t* pixels = (uint8_t*)malloc(img_sz);
      |                              ^
src/event_viz.cpp:67:12: error: ‘pixel’ was not declared in this scope
   67 |   uint8_t *pixel;
      |            ^~~~~
make: *** [makefile:83: bin/event_viz] Error 1```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant