Closed Roman- closed 3 years ago
std::array<int, 3> fgColor = {0};
@stefanhaustein I'm sure the initializer {0}
is the catalyst here. Perhaps change it to {0,0,0}
?
Edit: This should have been solved with #79 . What overwrote it? 2e91d92 ?
From: Roman Strakhov notifications@github.com Sent: Monday, October 19, 2020 9:21 AM To: stefanhaustein/TerminalImageViewer TerminalImageViewer@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [stefanhaustein/TerminalImageViewer] Build fails on Ubuntu 16.04 (#87)
$cd /tmp tmp$git clone https://github.com/stefanhaustein/TerminalImageViewer.git Cloning into 'TerminalImageViewer'... ;remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 669 (delta 3), reused 0 (delta 0), pack-reused 660
Receiving objects: 100% (669/669), 723.34 KiB | 762.00 KiB/s, done.
Resolving deltas: 100% (265/265), done.
Checking connectivity... done.
tmp$cd TerminalImageViewer/
TerminalImageViewer$..
tmp$cd TerminalImageViewer/src/main/cpp
cpp$make
g++ -O2 -fpermissive -std=c++17 -Wall -fexceptions -c -o tiv.o tiv.cpp
tiv.cpp:197:34: error: array must be initialized with a brace-enclosed initializer
std::array<int, 3> fgColor = {0};
^
tiv.cpp:198:34: error: array must be initialized with a brace-enclosed initializer
std::array<int, 3> bgColor = {0};
^
tiv.cpp: In function ‘CharData findCharData(const cimg_library::CImg
tiv.cpp:330:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; BITMAPS[i + 1] != end_marker; i += 2) {
^
Thanks for the pointer Aaron -- I am not sure what went wrong with the fix / PR. I have just replicated the change to address this.
p.s. Roman, can you confirm this is fixed now for Ubuntu 16.04 (I am using Manjaro...)
p.s. Roman, can you confirm this is fixed now for Ubuntu 16.04 (I am using Manjaro...)
It builds successfully and works fine!
Thanks!
gcc version: