I'm currently working on this project. I'm using cxxopts.hpp in order to parse cli options, but since I added it, I get some error that I now list how to reproduce:
Build the project
meson build cd build ninja
Everything good so far, it builds without any errors.
I can change anything other than
test/vector.cpp
andtest/random.cpp
(that are the places where I'm usingcxxopts.hpp
) and build withninja
without any problems.Then when I edit
test/vector.cpp
ortest/random.cpp
and doninja
these error appears:[1/4] Compiling C++ object test/random.p/random.cpp.o FAILED: test/random.p/random.cpp.o c++ -Itest/random.p -Itest -I../test -I../include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -O0 -g -MD -MQ test/random.p/random.cpp.o -MF test/random.p/random.cpp.o.d -o test/random.p/random.cpp.o -c ../test/random.cpp In file included from ../include/cxxopts.hpp:43, from ../test/random.cpp:6: test/vector:1:1: error: stray ‘\177’ in program 1 | <U+007F>ELF<U+0002><U+0001><U+0001><U+0003><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0003><U+0000>><U+0000><U+0001><U+0000><U+0000><U+0000> F<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>@<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><90><91><U+0015><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>@<U+0000>8<U+0000><U+000D><U+0000>@<U+0000>(<U+0000>'<U+0000><U+0006><U+0000><U+0000><U+0000><U+0004><U+0000><U+0000><U+0000>@<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>@<U+0000><U+0000><U+0000><U+0000>... (a very lengthy error up to 400 MB in a file)
How can I fix this or why does this happen in the first place?