terroo / tetris

Famous puzzle game remade with C++ and SFML
https://www.youtube.com/watch?v=TRzFKQw-uX4
GNU General Public License v3.0
15 stars 9 forks source link

can not complile #1

Open vincentaxhe opened 1 week ago

vincentaxhe commented 1 week ago

on arch, sfml installed

g++ -c -g -O0 -Wall -lsfml-graphics -lsfml-window -lsfml-system main.cpp -o main.o
In file included from main.cpp:1:
tetris.hpp:8:21: error: ‘uint32_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
    8 |   static const std::uint32_t lines   {20};
      |                     ^~~~~~~~
      |                     wint_t
tetris.hpp:9:21: error: ‘uint32_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
    9 |   static const std::uint32_t cols    {10};
      |                     ^~~~~~~~
      |                     wint_t
tetris.hpp:10:21: error: ‘uint32_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
   10 |   static const std::uint32_t squares {4};
      |                     ^~~~~~~~
      |                     wint_t
tetris.hpp:11:21: error: ‘uint32_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
   11 |   static const std::uint32_t shapes  {7};
      |                     ^~~~~~~~
      |                     wint_t
tetris.hpp:13:32: error: ‘uint32_t’ is not a member of ‘std’; did you mean ‘wint_t’?
   13 |   std::vector<std::vector<std::uint32_t>> area;
      |                                ^~~~~~~~
      |                                wint_t
tetris.hpp:13:32: error: template argument 1 is invalid
tetris.hpp:13:32: error: template argument 2 is invalid
tetris.hpp:13:40: error: template argument 1 is invalid
   13 |   std::vector<std::vector<std::uint32_t>> area;
      |                                        ^~
tetris.hpp:13:40: error: template argument 2 is invalid
tetris.hpp:14:32: error: ‘uint32_t’ is not a member of ‘std’; did you mean ‘wint_t’?
   14 |   std::vector<std::vector<std::uint32_t>> forms;
      |                                ^~~~~~~~
      |                                wint_t
tetris.hpp:14:32: error: template argument 1 is invalid
tetris.hpp:14:32: error: template argument 2 is invalid
tetris.hpp:14:40: error: template argument 1 is invalid
   14 |   std::vector<std::vector<std::uint32_t>> forms;
      |                                        ^~
tetris.hpp:14:40: error: template argument 2 is invalid
tetris.hpp:17:10: error: ‘uint32_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
   17 |     std::uint32_t x, y;
      |          ^~~~~~~~
      |          wint_t
tetris.hpp:18:7: error: ‘squares’ was not declared in this scope
   18 |   } z[squares], k[squares];
      |       ^~~~~~~
tetris.hpp:18:19: error: ‘squares’ was not declared in this scope
   18 |   } z[squares], k[squares];
      |                   ^~~~~~~
make: *** [Makefile:16: main.o] Error 1
terroo commented 1 week ago

I'm going to modify it, but you can change std::uint32_t to int and that will solve the problem.