Open heuchi opened 6 years ago
Where do you put this in the CMakeLists.txt file? Were you getting errors similar to these?
[ 73%] Building CXX object scanner/scanner-tag/CMakeFiles/scanner-tag.dir/rgtag.cpp.o /home/ec2-user/loudness-scanner/scanner/scanner-tag/rgtag.cpp: In function ‘bool tag_vorbis_comment(const char*, const char*, gain_data*, gain_data_strings*, bool)’: /home/ec2-user/loudness-scanner/scanner/scanner-tag/rgtag.cpp:310:39: error: expected type-specifier before ‘uint16_t’ static_cast<char>(static_cast<uint16_t>(opus_header_gain_int) & 0xff);
I've just added it at the very end of file scanner/CMakeLists.txt This is what I get without it:
[ 25%] Building CXX object scanner/scanner-tag/CMakeFiles/scanner-tag.dir/rgtag.cpp.o /home/joern/src/loudness-scanner/scanner/scanner-tag/rgtag.cpp: In function ‘bool tag_vorbis_comment(const char*, const char*, gain_data*, gain_data_strings*, bool)’: /home/joern/src/loudness-scanner/scanner/scanner-tag/rgtag.cpp:310:39: error: ‘uint16_t’ does not name a type static_cast(static_cast (opus_header_gain_int) & 0xff); ^ /home/joern/src/loudness-scanner/scanner/scanner-tag/rgtag.cpp:312:39: error: ‘uint16_t’ does not name a type static_cast (static_cast (opus_header_gain_int) >> 8); ^ /home/joern/src/loudness-scanner/scanner/scanner-tag/rgtag.cpp:317:24: error: ‘to_string’ is not a member of ‘std’ std::to_string(opus_r128_track_gain_int)); ^ /home/joern/src/loudness-scanner/scanner/scanner-tag/rgtag.cpp:320:26: error: ‘to_string’ is not a member of ‘std’ std::to_string(opus_r128_album_gain_int)); ^
Thanks... I was using an older version of CMAKE (2.8.12.2) that was ignoring the directive. Its working for me now with CMAKE 3.6.1. Thanks for the tip.
Is this still an issue? Compilation seems to work fine for me.
Same failure happens for me with gcc 13. Not seen with older gcc versions.
Issue obviously is that uint16_t
is officially provided only by header file <cstdint>
.
May have compiled with older compiler versions if indirectly some other std header files still pulled in type definitions.
Obvious fix is that any cpp file (like rgtag.cpp
) referring to such sized integer types on its own must include
Hi, thanks for this nice tool.
I just wanted to report that on my Ubuntu 16.04.5 LTS it did not compile until I added this line to scanner/CMakeLists.txt