Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrections for 64 bits Linux compilation #4

Open
GoogleCodeExporter opened this issue Nov 1, 2015 · 2 comments
Open

Corrections for 64 bits Linux compilation #4

GoogleCodeExporter opened this issue Nov 1, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Write a Makefile or bash script to compile on Linux
2. Attempt to compile
3. Stare at the errors and ponder the meaning of life

It's just a couple details really :

lzham_types.h: __int64 doesn't exist, uint64_t could be used by including 
stdint.h, or you could use the intptr_t data type designed specifically to be 
an integer wide enough to hold a pointer.

lzham_math.h: error: "call of overloaded 'is_power_of_2(size_t&)' is ambiguous" 
and "error: call of overloaded 'next_pow2(size_t&)' is ambiguous", just need to 
cast the size_t arguments or add the functions for size_t.

For all those who don't use Codeblocks, what about including a tiny bash script 
to compile? Here's one:

g++ -I./include/ -I./ -I./lzhamdecomp/  lzhamcomp/lzham_lzbase.cpp 
lzhamcomp/lzham_lzcomp.cpp lzhamcomp/lzham_lzcomp_internal.cpp 
lzhamcomp/lzham_lzcomp_state.cpp lzhamcomp/lzham_match_accel.cpp 
lzhamcomp/lzham_pthreads_threading.cpp  lzhamdecomp/lzham_assert.cpp 
lzhamdecomp/lzham_checksum.cpp lzhamdecomp/lzham_huffman_codes.cpp 
lzhamdecomp/lzham_lzdecomp.cpp lzhamdecomp/lzham_lzdecompbase.cpp 
lzhamdecomp/lzham_mem.cpp lzhamdecomp/lzham_platform.cpp 
lzhamdecomp/lzham_polar_codes.cpp lzhamdecomp/lzham_prefix_coding.cpp 
lzhamdecomp/lzham_symbol_codec.cpp lzhamdecomp/lzham_timer.cpp 
lzhamdecomp/lzham_vector.cpp  -g -O2 -fPIC -shared -Wl,-soname,liblzham -o 
liblzham.so -lpthread

Besides that, thanks for sharing this nice library! I'll be benchmarking to 
decide between it and my own... :)

Original issue reported on code.google.com by alexis.n...@gmail.com on 28 Jun 2013 at 1:34

@GoogleCodeExporter
Copy link
Author

Some further comments... To make a valid C API, the function prototypes lack a 
bunch of "enum" and "struct" everywhere. Either that, or setting some typedef 
to get rid of the extra keywords. I could send a patch with all my changes if 
you want.

Original comment by alexis.n...@gmail.com on 28 Jun 2013 at 3:38

@GoogleCodeExporter
Copy link
Author

Thank you very much Alexis! I'm working on LZHAM again, this time on Linux as 
my primary dev platform (Ubuntu 12.04 x64 using clang 3.3 and gcc). I'll 
integrate these changes.

Original comment by richge...@gmail.com on 31 Aug 2013 at 8:57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant