Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forgot to include <cstdint>? #53

Open
ghost opened this issue Jun 24, 2023 · 3 comments
Open

Forgot to include <cstdint>? #53

ghost opened this issue Jun 24, 2023 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 24, 2023

https://github.com/Jaysmito101/TerraForge3D/blob/gen2/TerraForge3D/include/Base/Heightmap.h

In file included from src/Base/Heightmap.cpp:1:
include/Base/Heightmap.h:9:27: error: expected ')' before 'width'
    9 |         Heightmap(uint32_t width, uint32_t height) : m_Width(width), m_Height(height), m_Data(nullptr), m_RendererID(0) {}
      |                  ~        ^~~~~~
      |                           )
include/Base/Heightmap.h:17:9: error: 'uint32_t' does not name a type
   17 |         uint32_t GetWidth() const
      |         ^~~~~~~~
include/Base/Heightmap.h:5:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
    4 | #include <string>
  +++ |+#include <cstdint>
    5 |
include/Base/Heightmap.h:21:9: error: 'uint32_t' does not name a type
   21 |         uint32_t GetHeight() const
      |         ^~~~~~~~
include/Base/Heightmap.h:21:9: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
include/Base/Heightmap.h:25:9: error: 'uint16_t' does not name a type
   25 |         uint16_t *GetData() const
      |         ^~~~~~~~
include/Base/Heightmap.h:25:9: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
include/Base/Heightmap.h:29:9: error: 'uint32_t' does not name a type
   29 |         uint32_t GetRendererID() const
      |         ^~~~~~~~
include/Base/Heightmap.h:29:9: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
include/Base/Heightmap.h:34:9: error: 'uint16_t' does not name a type
   34 |         uint16_t Sample(float x, float y, bool interpolated) const;
      |         ^~~~~~~~
include/Base/Heightmap.h:34:9: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
include/Base/Heightmap.h:37:9: error: 'uint32_t' does not name a type
   37 |         uint32_t m_Width, m_Height;
      |         ^~~~~~~~
include/Base/Heightmap.h:37:9: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
include/Base/Heightmap.h:38:9: error: 'uint16_t' does not name a type
   38 |         uint16_t *m_Data;
      |         ^~~~~~~~
include/Base/Heightmap.h:38:9: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
include/Base/Heightmap.h:39:9: error: 'uint32_t' does not name a type
   39 |         uint32_t m_RendererID;
      |         ^~~~~~~~
include/Base/Heightmap.h:39:9: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
include/Base/Heightmap.h:43:9: error: 'uint16_t' does not name a type
   43 |         uint16_t Get(uint32_t x, uint32_t y) const;
      |         ^~~~~~~~
include/Base/Heightmap.h:43:9: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
HeightmapNode.cpp
src/Base/Heightmap.cpp: In constructor 'Heightmap::Heightmap(std::string)':
src/Base/Heightmap.cpp:20:5: error: 'm_Data' was not declared in this scope; did you mean 'm_Path'?
   20 |     m_Data = static_cast<uint16_t*>(data);
      |     ^~~~~~
      |     m_Path
src/Base/Heightmap.cpp:21:5: error: 'm_Width' was not declared in this scope; did you mean 'width'?
   21 |     m_Width = width;
      |     ^~~~~~~
      |     width
src/Base/Heightmap.cpp:22:5: error: 'm_Height' was not declared in this scope; did you mean 'height'?
   22 |     m_Height = height;
      |     ^~~~~~~~
      |     height
src/Base/Heightmap.cpp:24:23: error: 'm_RendererID' was not declared in this scope
   24 |     glGenTextures(1, &m_RendererID);
      |                       ^~~~~~~~~~~~
src/Base/Heightmap.cpp: In destructor 'Heightmap::~Heightmap()':
src/Base/Heightmap.cpp:48:13: error: 'm_Data' was not declared in this scope; did you mean 'm_Path'?
   48 |         if (m_Data)
      |             ^~~~~~
      |             m_Path
src/Base/Heightmap.cpp:50:38: error: 'm_RendererID' was not declared in this scope
   50 |                 glDeleteTextures(1, &m_RendererID);
      |                                      ^~~~~~~~~~~~
src/Base/Heightmap.cpp: At global scope:
src/Base/Heightmap.cpp:55:10: error: no declaration matches 'uint16_t Heightmap::Sample(float, float, bool) const'
   55 | uint16_t Heightmap::Sample(float x, float y, bool interpolated) const
      |          ^~~~~~~~~
src/Base/Heightmap.cpp:55:10: note: no functions named 'uint16_t Heightmap::Sample(float, float, bool) const'
include/Base/Heightmap.h:6:7: note: 'class Heightmap' defined here
    6 | class Heightmap
      |       ^~~~~~~~~
src/Base/Heightmap.cpp:90:10: error: no declaration matches 'uint16_t Heightmap::Get(uint32_t, uint32_t) const'
   90 | uint16_t Heightmap::Get(uint32_t x, uint32_t y) const
      |          ^~~~~~~~~
src/Base/Heightmap.cpp:90:10: note: no functions named 'uint16_t Heightmap::Get(uint32_t, uint32_t) const'
include/Base/Heightmap.h:6:7: note: 'class Heightmap' defined here
    6 | class Heightmap
      |       ^~~~~~~~~
@ashish-nagmoti
Copy link

is error still there, what specifi problem is can you specify?

@Jaysmito101
Copy link
Owner

@ashish-nagmoti If i remember I might have fixed it long ago, it was not including in a header

@ashish-nagmoti
Copy link

ashish-nagmoti commented Apr 28, 2024

ohk 👍 then closee th pr I guess

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

No branches or pull requests

2 participants