I am getting below error while compiling the absl::flat_hash_map sample program
hash.cc:(.text+0x60): undefined reference to `absl::lts_20230802::hash_internal::CityHash32(char const*, unsigned long)'
helloworld.cpp
#include <iostream>
#include "absl/container/flat_hash_map.h"
int main() {
absl::flat_hash_map<int, std::string> map = {{1, "huey"}, {2, "dewey"}, {3, "louie"}};
for (auto it = map.begin(); it != map.end();) {
std::cout<<"it->second[0]"<<it->second[0];it++;
}
return 0;
}
the compile command is as below:
g++ -std=c++17 hello_world.cpp -o newout -L{installDir}/lib64 -labsl_hash -labsl_raw_hash_set -labsl_hashtablez_sampler -labsl_exponential_biased -labsl_synchronization -labsl_raw_logging_internal -labsl_base -I {installDir}/include
My issue seems exactly similar to the one here
Can anyone please help on what I am missing in compilation