DavidLeeds / hashmap

Templated type-safe hashmap implementation in C using open addressing and linear probing for collision resolution.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatibility with the c2x standard

Nizarll opened this issue · comments

root@vps103211:~/projects# gcc -c src/nnetwork.c -o obj/nnetwork.o -lhashmap
root@vps103211:~/projects# gcc -c src/nnetwork.c -o obj/nnetwork.o -lhashmap --std=c2x
In file included from src/../libs/nnetwork.h:5,
                 from src/nnetwork.c:1:
src/nnetwork.c: In functioninit’:
src/nnetwork.c:19:3: error: expected ‘;’ before__map_hash19 |   hashmap_init(&map1, hashmap_hash_string, strcmp);
      |   ^~~~~~~~~~~~
src/nnetwork.c:19:3: error: expected ‘;’ before__map_compare19 |   hashmap_init(&map1, hashmap_hash_string, strcmp);
      |   ^~~~~~~~~~~~
src/nnetwork.c:19:3: error: ‘__map_hashundeclared (first use in this function)
   19 |   hashmap_init(&map1, hashmap_hash_string, strcmp);
      |   ^~~~~~~~~~~~
src/nnetwork.c:19:3: note: each undeclared identifier is reported only once for each function it appears in
src/nnetwork.c:19:3: error: ‘__map_compareundeclared (first use in this function)
   19 |   hashmap_init(&map1, hashmap_hash_string, strcmp);
      |   ^~~~~~~~~~~~
root@vps103211:~/projects#