bonitao / cmph

Other
20 stars 2 forks source link

Code is broken and does not build #3

Open pps83 opened 4 years ago

pps83 commented 4 years ago

I tried to compile the library and I get these errors:

1>sdbm_hash.c
1>C:\work\cmph-git\src\sdbm_hash.c(8,34): error C2065: 'CMPH_HASH_SDBM': undeclared identifier
1>C:\work\cmph-git\src\sdbm_hash.c(48,34): error C2065: 'CMPH_HASH_SDBM': undeclared identifier
1>fnv_hash.c
1>C:\work\cmph-git\src\fnv_hash.c(8,33): error C2065: 'CMPH_HASH_FNV': undeclared identifier
1>C:\work\cmph-git\src\fnv_hash.c(53,33): error C2065: 'CMPH_HASH_FNV': undeclared identifier
1>djb2_hash.c
1>C:\work\cmph-git\src\djb2_hash.c(7,24): error C2065: 'djb2_state': undeclared identifier
1>C:\work\cmph-git\src\djb2_hash.c(8,34): error C2065: 'CMPH_HASH_DJB2': undeclared identifier
1>C:\work\cmph-git\src\djb2_hash.c(48,34): error C2065: 'CMPH_HASH_DJB2': undeclared identifier
1>czech.c
1>c1 : fatal error C1083: Cannot open source file: 'src\czech.c': No such file or directory

There is no way for this code to compile. Can you please commit version that actually builds?

Kristine1975 commented 2 years ago

It looks like this repository (as well as the one on sourceforce) contains files than aren't in the release that can be downloaded from sourceforge. These files contain additional hash functions (sdbm, fnv, djb2) that don't have constants in the CMPH_HASH enum in file cmph_types.h. Not sure about czech.c though.

bonitao commented 2 years ago

Can you give some reproduction instructions? How did you clone the repo? Which commands did you run?

Running

git clone https://github.com/bonitao/cmph.git
autoreconf -if
./configure
make

Works fine for me.

Kristine1975 commented 2 years ago

Can confirm, works for me, too (it doesn't try to compile the sbdm etc hashes). But judging from the error messages in the original description, they are running Windows and not using the Makefiles, but their own Visual Studio project to which they simply added all source files. Which, honestly, is something I would think works 😉