slmdev / sac

state-of-the-art lossless audio compression
44 stars 4 forks source link

Linux build instructions #6

Closed LaySoft closed 1 year ago

LaySoft commented 1 year ago

How can I compile it on Linux?

MartinEesmaa commented 1 year ago

Hi, @LaySoft!

To compile on Linux, use GCC with G++ command by:

g++ main.cpp cmdline.cpp ./common/*.cpp ./file/*.cpp ./libsac/*.cpp ./model/*.cpp ./pred/*.cpp -std=c++11 -static -O3 -osac

Feel free to reply with me. :)

LaySoft commented 1 year ago

Hi!

I tried your command, but many errors occured:

In file included from file/wav.h:4, from cmdline.h:5, from main.cpp:1: file/file.h:27:32: error: 'uint8_t' was not declared in this scope 27 void ReadData(std::vector &data,size_t len); ^~~ file/file.h:8:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? 7 #include +++ +#include 8 file/file.h:27:39: error: template argument 1 is invalid 27 void ReadData(std::vector &data,size_t len); ^ file/file.h:27:39: error: template argument 2 is invalid file/file.h:28:39: error: 'uint8_t' was not declared in this scope 28 void WriteData(const std::vector &data,size_t len); ^~~ file/file.h:28:39: note: 'uint8_t' is defined in header ''; did you forget to '#include '? file/file.h:28:46: error: template argument 1 is invalid 28 void WriteData(const std::vector &data,size_t len); ^ file/file.h:28:46: error: template argument 2 is invalid file/wav.h:9:7: error: 'uint32_t' does not name a type 9 uint32_t id,csize; ^~~~ file/wav.h:5:1: note: 'uint32_t' is defined in header ''; did you forget to '#include '? 4 #include "file.h" +++ +#include 5 file/wav.h:10:20: error: 'uint8_t' was not declared in this scope 10 std::vector data; ^~~ file/wav.h:10:20: note: 'uint8_t' is defined in header ''; did you forget to '#include '? file/wav.h:10:27: error: template argument 1 is invalid 10 std::vector data; ^ file/wav.h:10:27: error: template argument 2 is invalid file/wav.h:13:17: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ file/wav.h:13:34: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ file/wav.h:13:59: error: 'uint8_t' does not name a type 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~ file/wav.h:13:59: note: 'uint8_t' is defined in header ''; did you forget to '#include '? file/wav.h:13:73: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ file/wav.h:15:5: error: 'uint32_t' does not name a type 15 uint32_t GetChunkID(int chunk) const {return wavchunks[chunk].id;}; ^~~~ file/wav.h:15:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? file/wav.h:16:5: error: 'uint32_t' does not name a type 16 uint32_t GetChunkSize(int chunk) const {return wavchunks[chunk].csize;}; ^~~~ file/wav.h:16:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? file/wav.h:18:5: error: 'uint32_t' does not name a type 18 uint32_t GetMetaDataSize() const {return metadatasize;}; ^~~~ file/wav.h:18:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? file/wav.h:19:38: error: 'uint8_t' was not declared in this scope 19 size_t PackMetaData(std::vector &data); ^~~ file/wav.h:19:38: note: 'uint8_t' is defined in header ''; did you forget to '#include '? file/wav.h:19:45: error: template argument 1 is invalid 19 size_t PackMetaData(std::vector &data); ^ file/wav.h:19:45: error: template argument 2 is invalid file/wav.h:20:46: error: 'uint8_t' was not declared in this scope 20 size_t UnpackMetaData(const std::vector &data); ^~~ file/wav.h:20:46: note: 'uint8_t' is defined in header ''; did you forget to '#include '? file/wav.h:20:53: error: template argument 1 is invalid 20 size_t UnpackMetaData(const std::vector &data); ^ file/wav.h:20:53: error: template argument 2 is invalid file/wav.h:23:5: error: 'uint32_t' does not name a type 23 uint32_t metadatasize; ^~~~ file/wav.h:23:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? file/wav.h: In constructor 'Chunks::Chunks()': file/wav.h:12:14: error: class 'Chunks' does not have any field named 'metadatasize' 12 Chunks():metadatasize(0){}; ^~~~ file/wav.h: In member function 'size_t Chunks::GetChunkDataSize(int) const': file/wav.h:17:76: error: request for member 'size' in '((const Chunks*)this)->Chunks::wavchunks.std::vector::operator).Chunks::tChunk::data', which is of non-class type 'const int' 17 size_t GetChunkDataSize(int chunk) const {return wavchunks[chunk].data.size();}; ^~~~ file/wav.h: At global scope: file/wav.h:46:18: error: 'uint8_t' was not declared in this scope 46 std::vector filebuffer; ^~~ file/wav.h:46:18: note: 'uint8_t' is defined in header ''; did you forget to '#include '? file/wav.h:46:25: error: template argument 1 is invalid 46 std::vector filebuffer; ^ file/wav.h:46:25: error: template argument 2 is invalid In file included from libsac/libsac.h:5, from cmdline.h:6: libsac/../file/sac.h:26:18: error: 'uint8_t' was not declared in this scope 26 std::vector metadata; ^~~ libsac/../file/sac.h:6:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? 5 #include "wav.h" +++ +#include 6 libsac/../file/sac.h:26:25: error: template argument 1 is invalid 26 std::vector metadata; ^ libsac/../file/sac.h:26:25: error: template argument 2 is invalid libsac/../file/sac.h:28:6: error: 'uint32_t' does not name a type 28 uint32_t metadatasize,profile; ^~~~ libsac/../file/sac.h:28:6: note: 'uint32_t' is defined in header ''; did you forget to '#include '? libsac/../file/sac.h: In constructor 'Sac::Sac()': libsac/../file/sac.h:14:23: error: class 'Sac' does not have any field named 'metadatasize' 14 Sac():AudioFile(),metadatasize(0),profile(0){}; ^~~~ libsac/../file/sac.h:14:39: error: class 'Sac' does not have any field named 'profile' 14 Sac():AudioFile(),metadatasize(0),profile(0){}; ^~~ libsac/../file/sac.h: In constructor 'Sac::Sac(Wav&)': libsac/../file/sac.h:16:22: error: class 'Sac' does not have any field named 'metadatasize' 16 :AudioFile(file),metadatasize(0) ^~~~ libsac/../file/sac.h: In member function 'void Sac::SetProfile(int)': libsac/../file/sac.h:20:30: error: 'profile' was not declared in this scope; did you mean 'file'? 20 void SetProfile(int val){profile=val;}; ^~~ file libsac/../file/sac.h: In member function 'int Sac::GetProfile()': libsac/../file/sac.h:21:29: error: 'profile' was not declared in this scope; did you mean 'file'? 21 int GetProfile(){return profile;}; ^~~ file In file included from file/wav.h:4, from cmdline.h:5, from cmdline.cpp:1: file/file.h:27:32: error: 'uint8_t' was not declared in this scope 27 void ReadData(std::vector &data,size_t len); ^~~ file/file.h:8:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? 7 #include +++ +#include 8 file/file.h:27:39: error: template argument 1 is invalid 27 void ReadData(std::vector &data,size_t len); ^ file/file.h:27:39: error: template argument 2 is invalid file/file.h:28:39: error: 'uint8_t' was not declared in this scope 28 void WriteData(const std::vector &data,size_t len); ^~~ file/file.h:28:39: note: 'uint8_t' is defined in header ''; did you forget to '#include '? file/file.h:28:46: error: template argument 1 is invalid 28 void WriteData(const std::vector &data,size_t len); ^ file/file.h:28:46: error: template argument 2 is invalid file/wav.h:9:7: error: 'uint32_t' does not name a type 9 uint32_t id,csize; ^~~~ file/wav.h:5:1: note: 'uint32_t' is defined in header ''; did you forget to '#include '? 4 #include "file.h" +++ +#include 5 file/wav.h:10:20: error: 'uint8_t' was not declared in this scope 10 std::vector data; ^~~ file/wav.h:10:20: note: 'uint8_t' is defined in header ''; did you forget to '#include '? file/wav.h:10:27: error: template argument 1 is invalid 10 std::vector data; ^ file/wav.h:10:27: error: template argument 2 is invalid file/wav.h:13:17: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ file/wav.h:13:34: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ file/wav.h:13:59: error: 'uint8_t' does not name a type 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~ file/wav.h:13:59: note: 'uint8_t' is defined in header ''; did you forget to '#include '? file/wav.h:13:73: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ file/wav.h:15:5: error: 'uint32_t' does not name a type 15 uint32_t GetChunkID(int chunk) const {return wavchunks[chunk].id;}; ^~~~ file/wav.h:15:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? file/wav.h:16:5: error: 'uint32_t' does not name a type 16 uint32_t GetChunkSize(int chunk) const {return wavchunks[chunk].csize;}; ^~~~ file/wav.h:16:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? file/wav.h:18:5: error: 'uint32_t' does not name a type 18 uint32_t GetMetaDataSize() const {return metadatasize;}; ^~~~ file/wav.h:18:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? file/wav.h:19:38: error: 'uint8_t' was not declared in this scope 19 size_t PackMetaData(std::vector &data); ^~~ file/wav.h:19:38: note: 'uint8_t' is defined in header ''; did you forget to '#include '? file/wav.h:19:45: error: template argument 1 is invalid 19 size_t PackMetaData(std::vector &data); ^ file/wav.h:19:45: error: template argument 2 is invalid file/wav.h:20:46: error: 'uint8_t' was not declared in this scope 20 size_t UnpackMetaData(const std::vector &data); ^~~ file/wav.h:20:46: note: 'uint8_t' is defined in header ''; did you forget to '#include '? file/wav.h:20:53: error: template argument 1 is invalid 20 size_t UnpackMetaData(const std::vector &data); ^ file/wav.h:20:53: error: template argument 2 is invalid file/wav.h:23:5: error: 'uint32_t' does not name a type 23 uint32_t metadatasize; ^~~~ file/wav.h:23:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? file/wav.h: In constructor 'Chunks::Chunks()': file/wav.h:12:14: error: class 'Chunks' does not have any field named 'metadatasize' 12 Chunks():metadatasize(0){}; ^~~~ file/wav.h: In member function 'size_t Chunks::GetChunkDataSize(int) const': file/wav.h:17:76: error: request for member 'size' in '((const Chunks*)this)->Chunks::wavchunks.std::vector::operator).Chunks::tChunk::data', which is of non-class type 'const int' 17 size_t GetChunkDataSize(int chunk) const {return wavchunks[chunk].data.size();}; ^~~~ file/wav.h: At global scope: file/wav.h:46:18: error: 'uint8_t' was not declared in this scope 46 std::vector filebuffer; ^~~ file/wav.h:46:18: note: 'uint8_t' is defined in header ''; did you forget to '#include '? file/wav.h:46:25: error: template argument 1 is invalid 46 std::vector filebuffer; ^ file/wav.h:46:25: error: template argument 2 is invalid In file included from libsac/libsac.h:5, from cmdline.h:6: libsac/../file/sac.h:26:18: error: 'uint8_t' was not declared in this scope 26 std::vector metadata; ^~~ libsac/../file/sac.h:6:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? 5 #include "wav.h" +++ +#include 6 libsac/../file/sac.h:26:25: error: template argument 1 is invalid 26 std::vector metadata; ^ libsac/../file/sac.h:26:25: error: template argument 2 is invalid libsac/../file/sac.h:28:6: error: 'uint32_t' does not name a type 28 uint32_t metadatasize,profile; ^~~~ libsac/../file/sac.h:28:6: note: 'uint32_t' is defined in header ''; did you forget to '#include '? libsac/../file/sac.h: In constructor 'Sac::Sac()': libsac/../file/sac.h:14:23: error: class 'Sac' does not have any field named 'metadatasize' 14 Sac():AudioFile(),metadatasize(0),profile(0){}; ^~~~ libsac/../file/sac.h:14:39: error: class 'Sac' does not have any field named 'profile' 14 Sac():AudioFile(),metadatasize(0),profile(0){}; ^~~ libsac/../file/sac.h: In constructor 'Sac::Sac(Wav&)': libsac/../file/sac.h:16:22: error: class 'Sac' does not have any field named 'metadatasize' 16 :AudioFile(file),metadatasize(0) ^~~~ libsac/../file/sac.h: In member function 'void Sac::SetProfile(int)': libsac/../file/sac.h:20:30: error: 'profile' was not declared in this scope; did you mean 'file'? 20 void SetProfile(int val){profile=val;}; ^~~ file libsac/../file/sac.h: In member function 'int Sac::GetProfile()': libsac/../file/sac.h:21:29: error: 'profile' was not declared in this scope; did you mean 'file'? 21 int GetProfile(){return profile;}; ^~~ file In file included from ./file/file.cpp:1: ./file/file.h:27:32: error: 'uint8_t' was not declared in this scope 27 void ReadData(std::vector &data,size_t len); ^~~ ./file/file.h:8:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? 7 #include +++ +#include 8 ./file/file.h:27:39: error: template argument 1 is invalid 27 void ReadData(std::vector &data,size_t len); ^ ./file/file.h:27:39: error: template argument 2 is invalid ./file/file.h:28:39: error: 'uint8_t' was not declared in this scope 28 void WriteData(const std::vector &data,size_t len); ^~~ ./file/file.h:28:39: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/file.h:28:46: error: template argument 1 is invalid 28 void WriteData(const std::vector &data,size_t len); ^ ./file/file.h:28:46: error: template argument 2 is invalid ./file/file.cpp:26:39: error: 'uint8_t' was not declared in this scope 26 void AudioFile::ReadData(std::vector &data,size_t len) ^~~ ./file/file.cpp:2:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? 1 #include "file.h" +++ +#include 2 ./file/file.cpp:26:46: error: template argument 1 is invalid 26 void AudioFile::ReadData(std::vector &data,size_t len) ^ ./file/file.cpp:26:46: error: template argument 2 is invalid ./file/file.cpp: In member function 'void AudioFile::ReadData(int&, size_t)': ./file/file.cpp:28:12: error: request for member 'size' in 'data', which is of non-class type 'int' 28 if (data.size()<len) data.resize(len); ^~~~ ./file/file.cpp:28:29: error: request for member 'resize' in 'data', which is of non-class type 'int' 28 if (data.size()<len) data.resize(len); ^~ ./file/file.cpp:29:42: error: invalid types 'int[int]' for array subscript 29 file.read(reinterpret_cast<char*>(&data[0]),len); ^ ./file/file.cpp: At global scope: ./file/file.cpp:32:46: error: 'uint8_t' was not declared in this scope 32 void AudioFile::WriteData(const std::vector &data,size_t len) ^~~ ./file/file.cpp:32:46: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/file.cpp:32:53: error: template argument 1 is invalid 32 void AudioFile::WriteData(const std::vector &data,size_t len) ^ ./file/file.cpp:32:53: error: template argument 2 is invalid ./file/file.cpp: In member function 'void AudioFile::WriteData(const int&, size_t)': ./file/file.cpp:34:49: error: invalid types 'const int[int]' for array subscript 34 file.write(reinterpret_cast<const char*>(&data[0]),len); ^ In file included from ./file/sac.h:4, from ./file/sac.cpp:1: ./file/file.h:27:32: error: 'uint8_t' was not declared in this scope 27 void ReadData(std::vector &data,size_t len); ^~~ ./file/file.h:8:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? 7 #include +++ +#include 8 ./file/file.h:27:39: error: template argument 1 is invalid 27 void ReadData(std::vector &data,size_t len); ^ ./file/file.h:27:39: error: template argument 2 is invalid ./file/file.h:28:39: error: 'uint8_t' was not declared in this scope 28 void WriteData(const std::vector &data,size_t len); ^~~ ./file/file.h:28:39: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/file.h:28:46: error: template argument 1 is invalid 28 void WriteData(const std::vector &data,size_t len); ^ ./file/file.h:28:46: error: template argument 2 is invalid In file included from ./file/sac.h:5: ./file/wav.h:9:7: error: 'uint32_t' does not name a type 9 uint32_t id,csize; ^~~~ ./file/wav.h:1:1: note: 'uint32_t' is defined in header ''; did you forget to '#include '? +++ +#include 1 #ifndef WAV_H ./file/wav.h:10:20: error: 'uint8_t' was not declared in this scope 10 std::vector data; ^~~ ./file/wav.h:10:20: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:10:27: error: template argument 1 is invalid 10 std::vector data; ^ ./file/wav.h:10:27: error: template argument 2 is invalid ./file/wav.h:13:17: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ ./file/wav.h:13:34: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ ./file/wav.h:13:59: error: 'uint8_t' does not name a type 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~ ./file/wav.h:13:59: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:13:73: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ ./file/wav.h:15:5: error: 'uint32_t' does not name a type 15 uint32_t GetChunkID(int chunk) const {return wavchunks[chunk].id;}; ^~~~ ./file/wav.h:15:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:16:5: error: 'uint32_t' does not name a type 16 uint32_t GetChunkSize(int chunk) const {return wavchunks[chunk].csize;}; ^~~~ ./file/wav.h:16:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:18:5: error: 'uint32_t' does not name a type 18 uint32_t GetMetaDataSize() const {return metadatasize;}; ^~~~ ./file/wav.h:18:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:19:38: error: 'uint8_t' was not declared in this scope 19 size_t PackMetaData(std::vector &data); ^~~ ./file/wav.h:19:38: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:19:45: error: template argument 1 is invalid 19 size_t PackMetaData(std::vector &data); ^ ./file/wav.h:19:45: error: template argument 2 is invalid ./file/wav.h:20:46: error: 'uint8_t' was not declared in this scope 20 size_t UnpackMetaData(const std::vector &data); ^~~ ./file/wav.h:20:46: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:20:53: error: template argument 1 is invalid 20 size_t UnpackMetaData(const std::vector &data); ^ ./file/wav.h:20:53: error: template argument 2 is invalid ./file/wav.h:23:5: error: 'uint32_t' does not name a type 23 uint32_t metadatasize; ^~~~ ./file/wav.h:23:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./file/wav.h: In constructor 'Chunks::Chunks()': ./file/wav.h:12:14: error: class 'Chunks' does not have any field named 'metadatasize' 12 Chunks():metadatasize(0){}; ^~~~ ./file/wav.h: In member function 'size_t Chunks::GetChunkDataSize(int) const': ./file/wav.h:17:76: error: request for member 'size' in '((const Chunks*)this)->Chunks::wavchunks.std::vector::operator).Chunks::tChunk::data', which is of non-class type 'const int' 17 size_t GetChunkDataSize(int chunk) const {return wavchunks[chunk].data.size();}; ^~~~ ./file/wav.h: At global scope: ./file/wav.h:46:18: error: 'uint8_t' was not declared in this scope 46 std::vector filebuffer; ^~~ ./file/wav.h:46:18: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:46:25: error: template argument 1 is invalid 46 std::vector filebuffer; ^ ./file/wav.h:46:25: error: template argument 2 is invalid ./file/sac.h:26:18: error: 'uint8_t' was not declared in this scope 26 std::vector metadata; ^~~ ./file/sac.h:6:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? 5 #include "wav.h" +++ +#include 6 ./file/sac.h:26:25: error: template argument 1 is invalid 26 std::vector metadata; ^ ./file/sac.h:26:25: error: template argument 2 is invalid ./file/sac.h:28:6: error: 'uint32_t' does not name a type 28 uint32_t metadatasize,profile; ^~~~ ./file/sac.h:28:6: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./file/sac.h: In constructor 'Sac::Sac()': ./file/sac.h:14:23: error: class 'Sac' does not have any field named 'metadatasize' 14 Sac():AudioFile(),metadatasize(0),profile(0){}; ^~~~ ./file/sac.h:14:39: error: class 'Sac' does not have any field named 'profile' 14 Sac():AudioFile(),metadatasize(0),profile(0){}; ^~~ ./file/sac.h: In constructor 'Sac::Sac(Wav&)': ./file/sac.h:16:22: error: class 'Sac' does not have any field named 'metadatasize' 16 :AudioFile(file),metadatasize(0) ^~~~ ./file/sac.h: In member function 'void Sac::SetProfile(int)': ./file/sac.h:20:30: error: 'profile' was not declared in this scope; did you mean 'file'? 20 void SetProfile(int val){profile=val;}; ^~~ file ./file/sac.h: In member function 'int Sac::GetProfile()': ./file/sac.h:21:29: error: 'profile' was not declared in this scope; did you mean 'file'? 21 int GetProfile(){return profile;}; ^~~ file ./file/sac.cpp: In member function 'int Sac::WriteHeader(Wav&)': ./file/sac.cpp:8:40: error: 'class Chunks' has no member named 'GetMetaDataSize'; did you mean 'GetChunkDataSize'? 8 const uint32_t metadatasize=myChunks.GetMetaDataSize(); ^~~~~~~ GetChunkDataSize ./file/sac.cpp:19:28: error: 'profile' was not declared in this scope; did you mean 'file'? 19 BitUtils::put32LH(buf+16,profile); ^~~ file ./file/sac.cpp:22:29: error: cannot convert 'std::vector' to 'int&' 22 if (myChunks.PackMetaData(metadata)!=metadatasize) std::cerr << " warning: metadatasize mismatch\n"; ^~~~
std::vector
./file/wav.h:19:47: note: initializing argument 1 of 'size_t Chunks::PackMetaData(int&)' 19 size_t PackMetaData(std::vector &data); ~~~~^~ ./file/sac.cpp:23:13: error: cannot convert 'std::vector' to 'const int&' 23 WriteData(metadata,metadatasize); ^~~~
std::vector
./file/file.h:28:48: note: initializing argument 1 of 'void AudioFile::WriteData(const int&, size_t)' 28 void WriteData(const std::vector &data,size_t len); ~~~~~~^~ ./file/sac.cpp: In member function 'int Sac::UnpackMetaData(Wav&)': ./file/sac.cpp:30:7: error: 'metadatasize' was not declared in this scope; did you mean 'metadata'? 30 if (metadatasize!=unpackedbytes) {std::cerr << " warning: unpackmetadata mismatch\n";return 1;} ^~~~ metadata ./file/sac.cpp: In member function 'int Sac::ReadHeader()': ./file/sac.cpp:43:5: error: 'profile' was not declared in this scope; did you mean 'file'? 43 profile=BitUtils::get32LH(buf+16); ^~~ file ./file/sac.cpp:44:5: error: 'metadatasize' was not declared in this scope; did you mean 'metadata'? 44 metadatasize=BitUtils::get32LH(buf+20); ^~~~ metadata ./file/sac.cpp: In member function 'int Sac::UnpackMetaData(Wav&)': ./file/sac.cpp:29:56: warning: control reaches end of non-void function [-Wreturn-type] 29 size_t unpackedbytes=myWav.GetChunks().UnpackMetaData(metadata); ~~~~~~^~~~ In file included from ./file/wav.h:4, from ./file/wav.cpp:1: ./file/file.h:27:32: error: 'uint8_t' was not declared in this scope 27 void ReadData(std::vector &data,size_t len); ^~~ ./file/file.h:8:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? 7 #include +++ +#include 8 ./file/file.h:27:39: error: template argument 1 is invalid 27 void ReadData(std::vector &data,size_t len); ^ ./file/file.h:27:39: error: template argument 2 is invalid ./file/file.h:28:39: error: 'uint8_t' was not declared in this scope 28 void WriteData(const std::vector &data,size_t len); ^~~ ./file/file.h:28:39: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/file.h:28:46: error: template argument 1 is invalid 28 void WriteData(const std::vector &data,size_t len); ^ ./file/file.h:28:46: error: template argument 2 is invalid ./file/wav.h:9:7: error: 'uint32_t' does not name a type 9 uint32_t id,csize; ^~~~ ./file/wav.h:5:1: note: 'uint32_t' is defined in header ''; did you forget to '#include '? 4 #include "file.h" +++ +#include 5 ./file/wav.h:10:20: error: 'uint8_t' was not declared in this scope 10 std::vector data; ^~~ ./file/wav.h:10:20: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:10:27: error: template argument 1 is invalid 10 std::vector data; ^ ./file/wav.h:10:27: error: template argument 2 is invalid ./file/wav.h:13:17: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ ./file/wav.h:13:34: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ ./file/wav.h:13:59: error: 'uint8_t' does not name a type 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~ ./file/wav.h:13:59: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:13:73: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ ./file/wav.h:15:5: error: 'uint32_t' does not name a type 15 uint32_t GetChunkID(int chunk) const {return wavchunks[chunk].id;}; ^~~~ ./file/wav.h:15:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:16:5: error: 'uint32_t' does not name a type 16 uint32_t GetChunkSize(int chunk) const {return wavchunks[chunk].csize;}; ^~~~ ./file/wav.h:16:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:18:5: error: 'uint32_t' does not name a type 18 uint32_t GetMetaDataSize() const {return metadatasize;}; ^~~~ ./file/wav.h:18:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:19:38: error: 'uint8_t' was not declared in this scope 19 size_t PackMetaData(std::vector &data); ^~~ ./file/wav.h:19:38: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:19:45: error: template argument 1 is invalid 19 size_t PackMetaData(std::vector &data); ^ ./file/wav.h:19:45: error: template argument 2 is invalid ./file/wav.h:20:46: error: 'uint8_t' was not declared in this scope 20 size_t UnpackMetaData(const std::vector &data); ^~~ ./file/wav.h:20:46: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:20:53: error: template argument 1 is invalid 20 size_t UnpackMetaData(const std::vector &data); ^ ./file/wav.h:20:53: error: template argument 2 is invalid ./file/wav.h:23:5: error: 'uint32_t' does not name a type 23 uint32_t metadatasize; ^~~~ ./file/wav.h:23:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./file/wav.h: In constructor 'Chunks::Chunks()': ./file/wav.h:12:14: error: class 'Chunks' does not have any field named 'metadatasize' 12 Chunks():metadatasize(0){}; ^~~~ ./file/wav.h: In member function 'size_t Chunks::GetChunkDataSize(int) const': ./file/wav.h:17:76: error: request for member 'size' in '((const Chunks*)this)->Chunks::wavchunks.std::vector::operator).Chunks::tChunk::data', which is of non-class type 'const int' 17 size_t GetChunkDataSize(int chunk) const {return wavchunks[chunk].data.size();}; ^~~~ ./file/wav.h: At global scope: ./file/wav.h:46:18: error: 'uint8_t' was not declared in this scope 46 std::vector filebuffer; ^~~ ./file/wav.h:46:18: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./file/wav.h:46:25: error: template argument 1 is invalid 46 std::vector filebuffer; ^ ./file/wav.h:46:25: error: template argument 2 is invalid ./file/wav.cpp:5:6: error: no declaration matches 'void Chunks::Append(uint32_t, uint32_t, const uint8_t*, uint32_t)' 5 void Chunks::Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len) ^~ ./file/wav.h:13:10: note: candidate is: 'void Chunks::Append(int, int, const int*, int)' 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~ ./file/wav.h:6:7: note: 'class Chunks' defined here 6 class Chunks { ^~ ./file/wav.cpp:18:8: error: no declaration matches 'size_t Chunks::PackMetaData(std::vector&)' 18 size_t Chunks::PackMetaData(std::vector &data) ^~ ./file/wav.h:19:12: note: candidate is: 'size_t Chunks::PackMetaData(int&)' 19 size_t PackMetaData(std::vector &data); ^~~~ ./file/wav.h:6:7: note: 'class Chunks' defined here 6 class Chunks { ^~ ./file/wav.cpp:32:8: error: no declaration matches 'size_t Chunks::UnpackMetaData(const std::vector&)' 32 size_t Chunks::UnpackMetaData(const std::vector &data) ^~ ./file/wav.h:20:12: note: candidate is: 'size_t Chunks::UnpackMetaData(const int&)' 20 size_t UnpackMetaData(const std::vector &data); ^~~~~~ ./file/wav.h:6:7: note: 'class Chunks' defined here 6 class Chunks { ^~ ./file/wav.cpp: In member function 'void Wav::InitFileBuf(int)': ./file/wav.cpp:51:14: error: request for member 'resize' in '((Wav*)this)->Wav::filebuffer', which is of non-class type 'int' 51 filebuffer.resize(maxframesize*blockalign); ^~ ./file/wav.cpp: In member function 'int Wav::ReadSamples(std::vector<std::vector >&, int)': ./file/wav.cpp:59:48: error: invalid types 'int[int]' for array subscript 59 file.read(reinterpret_cast<char*>(&filebuffer[0]),bytestoread); ^ ./file/wav.cpp:69:36: error: invalid types 'int[int]' for array subscript 69 int16_t sample=((filebuffer[bufptr+1]<<8) filebuffer[bufptr]);bufptr+=2; ^ ./file/wav.cpp:69:61: error: invalid types 'int[int]' for array subscript 69 int16_t sample=((filebuffer[bufptr+1]<<8) filebuffer[bufptr]);bufptr+=2; ^ ./file/wav.cpp: In member function 'int Wav::WriteSamples(std::vector<std::vector >&, int)': ./file/wav.cpp:83:19: error: invalid types 'int[int]' for array subscript 83 filebuffer[bufptr]=sample&0xff; ^ ./file/wav.cpp:84:19: error: invalid types 'int[int]' for array subscript 84 filebuffer[bufptr+1]=(sample>>8)&0xff; ^ ./file/wav.cpp:89:49: error: invalid types 'int[int]' for array subscript 89 file.write(reinterpret_cast<char*>(&filebuffer[0]),bytestowrite); ^ ./file/wav.cpp: In member function 'int Wav::ReadHeader()': ./file/wav.cpp:107:42: error: cannot convert 'uint8_t' {aka 'unsigned char'} to 'const int*' 107 myChunks.Append(chunkid,chunksize,buf+8,4); ~~~^~
uint8_t {aka unsigned char}
./file/wav.h:13:68: note: initializing argument 3 of 'void Chunks::Append(int, int, const int*, int)' 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ~~~^~~~ ./file/wav.cpp:119:47: error: cannot convert 'uint8_t [32]' {aka 'unsigned char [32]'} to 'const int*' 119 myChunks.Append(chunkid,chunksize,buf,chunksize); ^~~
uint8_t [32] {aka unsigned char [32]}
./file/wav.h:13:68: note: initializing argument 3 of 'void Chunks::Append(int, int, const int*, int)' 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ~~~^~~~ ./file/wav.cpp:147:18: error: cannot convert 'std::vector' to 'int&' 147 ReadData(vbuf,readsize); ^~~~
std::vector
./file/file.h:27:41: note: initializing argument 1 of 'void AudioFile::ReadData(int&, size_t)' 27 void ReadData(std::vector &data,size_t len); ~~~~^~ ./file/wav.cpp:148:43: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator, unsigned char>::value_type' {aka 'unsigned char'} to 'const int*' 148 myChunks.Append(chunkid,chunksize,&vbuf[0],readsize); ./file/wav.h:13:68: note: initializing argument 3 of 'void Chunks::Append(int, int, const int*, int)' 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ~~~^~~~ ./file/wav.cpp:157:94: error: 'class Chunks' has no member named 'GetChunkID'; did you mean 'tChunk'? 157 std::cout << " Chunk" << std::setw(2) << (i+1) << ": '" << BitUtils::U322Str(myChunks.GetChunkID(i)) << "' " << myChunks.GetChunkSize(i) << " Bytes\n"; ^~~~~~ tChunk ./file/wav.cpp:157:129: error: 'class Chunks' has no member named 'GetChunkSize'; did you mean 'GetChunkDataSize'? 157 std::cout << " Chunk" << std::setw(2) << (i+1) << ": '" << BitUtils::U322Str(myChunks.GetChunkID(i)) << "' " << myChunks.GetChunkSize(i) << " Bytes\n"; ^~~~ GetChunkDataSize ./file/wav.cpp:158:48: error: 'class Chunks' has no member named 'GetMetaDataSize'; did you mean 'GetChunkDataSize'? 158 std::cout << " Metadatasize: " << myChunks.GetMetaDataSize() << " Bytes\n"; ^~~~~~~ GetChunkDataSize ./file/wav.cpp: In member function 'int Wav::WriteHeader()': ./file/wav.cpp:170:35: error: 'const struct Chunks::tChunk' has no member named 'id' 170 BitUtils::put32LH(buf+0,chunk.id); ^~ ./file/wav.cpp:171:35: error: 'const struct Chunks::tChunk' has no member named 'csize' 171 BitUtils::put32LH(buf+4,chunk.csize); ^~~~~ ./file/wav.cpp:173:15: error: 'const struct Chunks::tChunk' has no member named 'id' 173 if (chunk.id==0x61746164) break; ^~ ./file/wav.cpp:175:63: error: request for member 'size' in 'chunk.Chunks::tChunk::data', which is of non-class type 'const int' 175 if (verbose) std::cout << " chunk size " << chunk.data.size() << std::endl; ^~~~ ./file/wav.cpp:176:40: error: request for member 'size' in 'chunk.Chunks::tChunk::data', which is of non-class type 'const int' 176 WriteData(chunk.data,chunk.data.size()); ^~~~ In file included from ./libsac/../file/wav.h:4, from ./libsac/libsac.h:4, from ./libsac/libsac.cpp:1: ./libsac/../file/file.h:27:32: error: 'uint8_t' was not declared in this scope 27 void ReadData(std::vector &data,size_t len); ^~~ ./libsac/../file/file.h:8:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? 7 #include +++ +#include 8 ./libsac/../file/file.h:27:39: error: template argument 1 is invalid 27 void ReadData(std::vector &data,size_t len); ^ ./libsac/../file/file.h:27:39: error: template argument 2 is invalid ./libsac/../file/file.h:28:39: error: 'uint8_t' was not declared in this scope 28 void WriteData(const std::vector &data,size_t len); ^~~ ./libsac/../file/file.h:28:39: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./libsac/../file/file.h:28:46: error: template argument 1 is invalid 28 void WriteData(const std::vector &data,size_t len); ^ ./libsac/../file/file.h:28:46: error: template argument 2 is invalid ./libsac/../file/wav.h:9:7: error: 'uint32_t' does not name a type 9 uint32_t id,csize; ^~~~ ./libsac/../file/wav.h:5:1: note: 'uint32_t' is defined in header ''; did you forget to '#include '? 4 #include "file.h" +++ +#include 5 ./libsac/../file/wav.h:10:20: error: 'uint8_t' was not declared in this scope 10 std::vector data; ^~~ ./libsac/../file/wav.h:10:20: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./libsac/../file/wav.h:10:27: error: template argument 1 is invalid 10 std::vector data; ^ ./libsac/../file/wav.h:10:27: error: template argument 2 is invalid ./libsac/../file/wav.h:13:17: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ ./libsac/../file/wav.h:13:34: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ ./libsac/../file/wav.h:13:59: error: 'uint8_t' does not name a type 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~ ./libsac/../file/wav.h:13:59: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./libsac/../file/wav.h:13:73: error: 'uint32_t' has not been declared 13 void Append(uint32_t chunkid,uint32_t chunksize,const uint8_t *data,uint32_t len); ^~~~ ./libsac/../file/wav.h:15:5: error: 'uint32_t' does not name a type 15 uint32_t GetChunkID(int chunk) const {return wavchunks[chunk].id;}; ^~~~ ./libsac/../file/wav.h:15:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./libsac/../file/wav.h:16:5: error: 'uint32_t' does not name a type 16 uint32_t GetChunkSize(int chunk) const {return wavchunks[chunk].csize;}; ^~~~ ./libsac/../file/wav.h:16:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./libsac/../file/wav.h:18:5: error: 'uint32_t' does not name a type 18 uint32_t GetMetaDataSize() const {return metadatasize;}; ^~~~ ./libsac/../file/wav.h:18:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./libsac/../file/wav.h:19:38: error: 'uint8_t' was not declared in this scope 19 size_t PackMetaData(std::vector &data); ^~~ ./libsac/../file/wav.h:19:38: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./libsac/../file/wav.h:19:45: error: template argument 1 is invalid 19 size_t PackMetaData(std::vector &data); ^ ./libsac/../file/wav.h:19:45: error: template argument 2 is invalid ./libsac/../file/wav.h:20:46: error: 'uint8_t' was not declared in this scope 20 size_t UnpackMetaData(const std::vector &data); ^~~ ./libsac/../file/wav.h:20:46: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./libsac/../file/wav.h:20:53: error: template argument 1 is invalid 20 size_t UnpackMetaData(const std::vector &data); ^ ./libsac/../file/wav.h:20:53: error: template argument 2 is invalid ./libsac/../file/wav.h:23:5: error: 'uint32_t' does not name a type 23 uint32_t metadatasize; ^~~~ ./libsac/../file/wav.h:23:5: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./libsac/../file/wav.h: In constructor 'Chunks::Chunks()': ./libsac/../file/wav.h:12:14: error: class 'Chunks' does not have any field named 'metadatasize' 12 Chunks():metadatasize(0){}; ^~~~ ./libsac/../file/wav.h: In member function 'size_t Chunks::GetChunkDataSize(int) const': ./libsac/../file/wav.h:17:76: error: request for member 'size' in '((const Chunks*)this)->Chunks::wavchunks.std::vector::operator).Chunks::tChunk::data', which is of non-class type 'const int' 17 size_t GetChunkDataSize(int chunk) const {return wavchunks[chunk].data.size();}; ^~~~ ./libsac/../file/wav.h: At global scope: ./libsac/../file/wav.h:46:18: error: 'uint8_t' was not declared in this scope 46 std::vector filebuffer; ^~~ ./libsac/../file/wav.h:46:18: note: 'uint8_t' is defined in header ''; did you forget to '#include '? ./libsac/../file/wav.h:46:25: error: template argument 1 is invalid 46 std::vector filebuffer; ^ ./libsac/../file/wav.h:46:25: error: template argument 2 is invalid In file included from ./libsac/libsac.h:5: ./libsac/../file/sac.h:26:18: error: 'uint8_t' was not declared in this scope 26 std::vector metadata; ^~~ ./libsac/../file/sac.h:6:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? 5 #include "wav.h" +++ +#include 6 ./libsac/../file/sac.h:26:25: error: template argument 1 is invalid 26 std::vector metadata; ^ ./libsac/../file/sac.h:26:25: error: template argument 2 is invalid ./libsac/../file/sac.h:28:6: error: 'uint32_t' does not name a type 28 uint32_t metadatasize,profile; ^~~~ ./libsac/../file/sac.h:28:6: note: 'uint32_t' is defined in header ''; did you forget to '#include '? ./libsac/../file/sac.h: In constructor 'Sac::Sac()': ./libsac/../file/sac.h:14:23: error: class 'Sac' does not have any field named 'metadatasize' 14 Sac():AudioFile(),metadatasize(0),profile(0){}; ^~~~ ./libsac/../file/sac.h:14:39: error: class 'Sac' does not have any field named 'profile' 14 Sac():AudioFile(),metadatasize(0),profile(0){}; ^~~ ./libsac/../file/sac.h: In constructor 'Sac::Sac(Wav&)': ./libsac/../file/sac.h:16:22: error: class 'Sac' does not have any field named 'metadatasize' 16 :AudioFile(file),metadatasize(0) ^~~~ ./libsac/../file/sac.h: In member function 'void Sac::SetProfile(int)': ./libsac/../file/sac.h:20:30: error: 'profile' was not declared in this scope; did you mean 'file'? 20 void SetProfile(int val){profile=val;}; ^~~ file ./libsac/../file/sac.h: In member function 'int Sac::GetProfile()': ./libsac/../file/sac.h:21:29: error: 'profile' was not declared in this scope; did you mean 'file'? 21 int GetProfile(){return profile;}; ^~~ file ./libsac/libsac.cpp: In member function 'void FrameCoder::EncodeProfile(const SacProfile&, std::vector&)': ./libsac/libsac.cpp:707:6: error: 'memcpy' was not declared in this scope 707 memcpy(&ix,&profile.coefs[i].vdef,4); ^~ ./libsac/libsac.cpp:5:1: note: 'memcpy' is defined in header ''; did you forget to '#include '? 4 #include "../common/timer.h" +++ +#include 5 ./libsac/libsac.cpp: In member function 'void FrameCoder::DecodeProfile(SacProfile&, const std::vector&)': ./libsac/libsac.cpp:718:6: error: 'memcpy' was not declared in this scope 718 memcpy(&profile.coefs[i].vdef,&ix,4); ^~ ./libsac/libsac.cpp:718:6: note: 'memcpy' is defined in header ''; did you forget to '#include '? ./libsac/libsac.cpp: In member function 'void FrameCoder::WriteEncoded(AudioFile&)': ./libsac/libsac.cpp:748:38: error: cannot convert 'std::vector' to 'const int&' 748 fout.WriteData(encoded[ch].GetBuf(),blocksize); ~~~~~~^~
std::vector
./libsac/../file/file.h:28:48: note: initializing argument 1 of 'void AudioFile::WriteData(const int&, size_t)' 28 void WriteData(const std::vector &data,size_t len); ~~~~~~^~ ./libsac/libsac.cpp: In member function 'void FrameCoder::ReadEncoded(AudioFile&)': ./libsac/libsac.cpp:771:36: error: cannot convert 'std::vector' to 'int&' 771 fin.ReadData(encoded[ch].GetBuf(),blocksize); ~~~~~~^~
std::vector

./libsac/../file/file.h:27:41: note: initializing argument 1 of 'void AudioFile::ReadData(int&, size_t)' 27 | void ReadData(std::vector &data,size_t len); | ~~~~^~ In file included from ./libsac/../model/range.h:4, from ./libsac/map.h:4, from ./libsac/map.cpp:1: ./libsac/../model/../common/bufio.h:21:7: error: 'size_t' does not name a type 21 | size_t GetBufPos(){return bufpos;}; | ^~ ./libsac/../model/../common/bufio.h:6:1: note: 'size_t' is defined in header ''; did you forget to '#include '? 5 | #include +++ |+#include 6 | ./libsac/../model/../common/bufio.h:24:6: error: 'size_t' does not name a type 24 | size_t bufpos; | ^~ ./libsac/../model/../common/bufio.h:24:6: note: 'size_t' is defined in header ''; did you forget to '#include '? ./libsac/../model/../common/bufio.h: In member function 'void BufIO::Reset()': ./libsac/../model/../common/bufio.h:11:20: error: 'bufpos' was not declared in this scope 11 | void Reset(){bufpos=0;}; | ^~ ./libsac/../model/../common/bufio.h: In member function 'void BufIO::PutByte(int)': ./libsac/../model/../common/bufio.h:14:13: error: 'bufpos' was not declared in this scope 14 | if (bufpos>=buf.size()) buf.resize(buf.size()2); | ^~ ./libsac/../model/../common/bufio.h:15:13: error: 'bufpos' was not declared in this scope 15 | buf[bufpos++]=val; | ^~ ./libsac/../model/../common/bufio.h: In member function 'int BufIO::GetByte()': ./libsac/../model/../common/bufio.h:18:13: error: 'bufpos' was not declared in this scope 18 | if (bufpos>=buf.size()) return -1; | ^~ In file included from ./libsac/../model/range.h:4, from ./libsac/vle.h:4, from ./libsac/vle.cpp:1: ./libsac/../model/../common/bufio.h:21:7: error: 'size_t' does not name a type 21 | size_t GetBufPos(){return bufpos;}; | ^~ ./libsac/../model/../common/bufio.h:6:1: note: 'size_t' is defined in header ''; did you forget to '#include '? 5 | #include +++ |+#include 6 | ./libsac/../model/../common/bufio.h:24:6: error: 'size_t' does not name a type 24 | size_t bufpos; | ^~ ./libsac/../model/../common/bufio.h:24:6: note: 'size_t' is defined in header ''; did you forget to '#include '? ./libsac/../model/../common/bufio.h: In member function 'void BufIO::Reset()': ./libsac/../model/../common/bufio.h:11:20: error: 'bufpos' was not declared in this scope 11 | void Reset(){bufpos=0;}; | ^~ ./libsac/../model/../common/bufio.h: In member function 'void BufIO::PutByte(int)': ./libsac/../model/../common/bufio.h:14:13: error: 'bufpos' was not declared in this scope 14 | if (bufpos>=buf.size()) buf.resize(buf.size()2); | ^~ ./libsac/../model/../common/bufio.h:15:13: error: 'bufpos' was not declared in this scope 15 | buf[bufpos++]=val; | ^~ ./libsac/../model/../common/bufio.h: In member function 'int BufIO::GetByte()': ./libsac/../model/../common/bufio.h:18:13: error: 'bufpos' was not declared in this scope 18 | if (bufpos>=buf.size()) return -1; | ^~ In file included from ./model/range.h:4, from ./model/range.cpp:1: ./model/../common/bufio.h:21:7: error: 'size_t' does not name a type 21 | size_t GetBufPos(){return bufpos;}; | ^~ ./model/../common/bufio.h:6:1: note: 'size_t' is defined in header ''; did you forget to '#include '? 5 | #include +++ |+#include 6 | ./model/../common/bufio.h:24:6: error: 'size_t' does not name a type 24 | size_t bufpos; | ^~ ./model/../common/bufio.h:24:6: note: 'size_t' is defined in header ''; did you forget to '#include '? ./model/../common/bufio.h: In member function 'void BufIO::Reset()': ./model/../common/bufio.h:11:20: error: 'bufpos' was not declared in this scope 11 | void Reset(){bufpos=0;}; | ^~ ./model/../common/bufio.h: In member function 'void BufIO::PutByte(int)': ./model/../common/bufio.h:14:13: error: 'bufpos' was not declared in this scope 14 | if (bufpos>=buf.size()) buf.resize(buf.size()*2); | ^~ ./model/../common/bufio.h:15:13: error: 'bufpos' was not declared in this scope 15 | buf[bufpos++]=val; | ^~ ./model/../common/bufio.h: In member function 'int BufIO::GetByte()': ./model/../common/bufio.h:18:13: error: 'bufpos' was not declared in this scope 18 | if (bufpos>=buf.size()) return -1; | ^~

MartinEesmaa commented 1 year ago

Hi, @LaySoft! I think you're using GCC 13 compiler on your computer, try @T-3B's forked repository: https://github.com/T-3B/sac. It has fixes and improvements with GCC 13 compilation issues and others too.

LaySoft commented 1 year ago

Thank you, it works with your compile command!

T-3B commented 1 year ago

@LaySoft I've also uploaded binaries of SAC for Windows, Linux, Android (x86-64 and aarch64 CPU architectures). See here: https://github.com/T-3B/sac/releases/tag/0.6.3%2B

These builds are more optimized than yours (and will run faster), because of PGO and LTO. Feel free to close this issue or to ask me about anything.