Reputation: 11
In my project, I am asked to use Google's Sparse Hash. But I don't even know where to start. These are steps that I take and do not get my code even compiled:
The error is
Multiple markers at this line
- fatal error: google/sparse_hash_map: No such file or directory
- Unresolved inclusion: <google/sparse_hash_map>
I really don't know what to do. Waiting for your helps.
Upvotes: 1
Views: 2640
Reputation: 11
You could locate sparse_hash_set in your computer ( locate sparse_hash_set ) and create a symbolic link from the directory where sparse_hash_set is installed to google/sparse_hash_map.
test@ubuntu:~# updatedb # To update the locate database
test@ubuntu:~# locate sparse_hash_map
/usr/include/google/sparsehash/sparse_hash_map
test@ubuntu:~# ln -s /usr/include/google/sparsehash/sparse_hash_map /usr/include/google/sparse_hash_map
Upvotes: 0
Reputation: 21
Sorry if this is obvious, but if your google hashmap source is already in the same directory as your code is, you should probably try:
#include "sparse_hash_map"
instead of
#include <google/sparse_hash_map>
Worse case, include -I</directory/to/google/sparse_hash_map>
in your compile command line.
Good luck!
Upvotes: 2