stefanhaustein / TerminalImageViewer

Small C++ program to display images in a (modern) terminal using RGB ANSI codes and unicode block graphics characters
Other
1.56k stars 111 forks source link

Fix std::array initialization error #79

Closed austinatchley closed 4 years ago

austinatchley commented 4 years ago

With the default compiler and Makefile settings, I ran into a compilation error after running make. This quick fix removed the errors and allowed me to make and install the tool.

aaronliu0130 commented 4 years ago

With the default compiler and Makefile settings, I ran into a compilation error after running make. This quick fix removed the errors and allowed me to make and install the tool.

Sorry for a late reply. Can you please tell me what compilation errors you ran into and what options you supplied(if any)?

stefanhaustein commented 4 years ago

Thanks!

austinatchley commented 4 years ago

Here's the error in case it's still useful:

g++ -O2 -fpermissive -std=c++17 -Wall -fexceptions   -c -o tiv.o tiv.cpp
tiv.cpp:125:34: error: array must be initialized with a brace-enclosed initializer
   std::array<int, 3> fgColor = {0};
                                  ^
tiv.cpp:126:34: error: array must be initialized with a brace-enclosed initializer
   std::array<int, 3> bgColor = {0};
                                  ^
<builtin>: recipe for target 'tiv.o' failed
make: *** [tiv.o] Error 1

As you can see, there are no options specified. I just executed make in the cpp directory.

Edit: Is this error reproducible? Do you need any other info?