schnaader / fairytale

encode.ru community archiver
GNU Lesser General Public License v3.0
31 stars 13 forks source link

Compilation #3

Closed andrew-epstein closed 6 years ago

andrew-epstein commented 6 years ago

How do you compile this? I think we should provide a Makefile, or maybe even better, a CMakeLists.txt

Right now I am trying to compile with this command:

g++ fairytale.cpp filestream.cpp hybridstream.cpp storagemanager.cpp block.cpp deduper.cpp analyser.cpp

But I get this error:


parsers/deflateparser.h: In member function 'bool DeflateParser<BruteMode>::validate(uint32_t, uint32_t, bool)':
parsers/deflateparser.h:90:49: error: call of overloaded 'max(long unsigned int, const uint32_t&)' is ambiguous
     return (in>max(32ul/max(1ul, out/max(1ul, in)), uint32_t(brute)<<7));
                                                 ^
In file included from stream.h:23:0,
                 from filestream.h:23,
                 from hybridstream.h:23,
                 from storagemanager.h:23,
                 from block.h:23,
                 from deduper.h:23,
                 from analyser.h:23,
                 from analyser.cpp:20:
common.h:145:12: note: candidate: int max(int, int)
 inline int max(int a, int b) { return a<b?b:a; }
            ^~~
common.h:147:17: note: candidate: uint32_t max(uint32_t, uint32_t)
 inline uint32_t max(uint32_t a, uint32_t b) { return a<b?b:a; }
                 ^~~
common.h:149:15: note: candidate: size_t max(size_t, size_t)
 inline size_t max(size_t a, size_t b) { return a<b?b:a; }
               ^~~
common.h:151:16: note: candidate: int64_t max(int64_t, int64_t)
 inline int64_t max(int64_t a, int64_t b) { return a<b?b:a; }
                ^~~```
M-Gonzalo commented 6 years ago

We were commenting this on the gitter chat today. Probably tomorrow one of the guys will upload a working makefile. Please have in mind that this is in a very alpha stage.

schnaader commented 6 years ago

Done, see commits 9795922 (Linux Makefile) and 858eecf (Windows MinGW batch file)

I'll leave the issue open until we know the Makefile works for ARM and OSX or created modified Makefiles for them.

andrew-epstein commented 6 years ago

Works great! Thanks!