How to use in Eclipse

81 views
Skip to first unread message

caca0631

unread,
Nov 18, 2011, 12:47:59 PM11/18/11
to google-sparsehash
Hey guys,

I am just a random college student and I am asked to use
sparsehash-1.11 in my project. However, I have no idea about how to
get started. I am using Eclipse for C++, by the way. I tried to read
the "readme.txt"s in the zip file, however it did not help as well.
Could you please tell me what are the steps that I should take to use
Google's sparse hash in my project?

For instance, puting the file named sparsehash-1.11 in the same
directory as where my .cpp file works should be a step (but did not
work). Also, I should include <google/sparse_hash_map>, but it did not
worked as well.

Regards,
Cagatay Yildiz

Craig Silverstein

unread,
Nov 18, 2011, 4:19:15 PM11/18/11
to google-s...@googlegroups.com
} For instance, puting the file named sparsehash-1.11 in the same
} directory as where my .cpp file works should be a step

Do you mean sparsehash-1.11.zip?

The easiest way is to unzip sparsehash-1.11.zip (or .tar.gz, or
whatever you download), and move the src/google directory so it's in
the same directory as your .cpp file.

A more principled way to do this is to install the src/google
directory somewhere on your system, and then set up eclipse to add
that 'somewhere' as an include directory (-I).

craig

Çağatay Yıldız

unread,
Nov 18, 2011, 4:36:33 PM11/18/11
to google-s...@googlegroups.com
I have done what you said but it did not work. Plus, I typed 
#include <google/sparse_hash_map>
at the beginning of my code.

2011/11/18 Craig Silverstein <csil...@google.com>

--
You received this message because you are subscribed to the Google Groups "google-sparsehash" group.
To post to this group, send email to google-s...@googlegroups.com.
To unsubscribe from this group, send email to google-sparseh...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-sparsehash?hl=en.


Çağatay Yıldız

unread,
Nov 18, 2011, 4:38:58 PM11/18/11
to google-s...@googlegroups.com
Note that the error is the following:
Multiple markers at this line
- fatal error: sparse_hash_map: No such file or
directory
- Unresolved inclusion: <sparse_hash_map>


18 Kasım 2011 23:36 tarihinde Çağatay Yıldız <cagatay...@gmail.com> yazdı:

Craig Silverstein

unread,
Nov 18, 2011, 4:51:24 PM11/18/11
to google-s...@googlegroups.com
} I have done what you said but it did not work. Plus, I typed 
} #include <google/sparse_hash_map> at the beginning of my code.

I think your best bet will be to find someone local to you to help you
figure this out. It's not a sparsehash-specific issue.

craig

Çağatay Yıldız

unread,
Nov 18, 2011, 4:53:56 PM11/18/11
to google-s...@googlegroups.com
I get it, thanks Craig. But let me ask one thing, if we use only files under src/google, why there exists many other files?

18 Kasım 2011 23:51 tarihinde Craig Silverstein <csil...@google.com> yazdı:

craig

Craig Silverstein

unread,
Nov 18, 2011, 5:00:14 PM11/18/11
to google-s...@googlegroups.com
} I get it, thanks Craig. But let me ask one thing, if we use only
} files under src/google, why there exists many other files?

Those are for the unittests, documentation, configuration, and other
tasks.

You never said if you were using this under windows, linux, os x, or
some other OS, but if you're using a linux-type OS, you can follow the
instructions in the INSTALL file to install. (Those instructions
require all these other files.)

craig

Çağatay Yıldız

unread,
Nov 18, 2011, 5:09:46 PM11/18/11
to google-s...@googlegroups.com
I am a windows user unfortunately :)

19 Kasım 2011 00:00 tarihinde Craig Silverstein <csil...@google.com> yazdı:

craig

Çağatay Yıldız

unread,
Nov 19, 2011, 8:21:05 AM11/19/11
to google-s...@googlegroups.com
Hey again Craig,

I am now informed that a friend of mine is able to use sparsehash in Windows 7. However, his system is 32 bit and mine is 64, which is the reason why I am unable to use the file. Could there be a mistake with the code?

Thanks, Cagatay.



19 Kasım 2011 00:09 tarihinde Çağatay Yıldız <cagatay...@gmail.com> yazdı:

Craig Silverstein

unread,
Nov 21, 2011, 1:36:38 PM11/21/11
to google-s...@googlegroups.com
} However, his system is 32 bit and mine is 64, which is the reason
} why I am unable to use the file. Could there be a mistake with the
} code?

Possible, but unlikely: we successfully use the code in 64-bit unix
installations all the time.

I think you'll have to track this down yourself. If you do find a
problem, definitely let us know!

craig

Özcan Yaylagül

unread,
Aug 2, 2021, 1:55:17 PM8/2/21
to google-sparsehash
Çağatay merhaba benle iletişime geçer misin bu mesajı ne zaman görürsen gör lütfen benle iletişime geç mail: ozcany...@gmail.com

18 Kasım 2011 Cuma tarihinde saat 19:47:59 UTC+2 itibarıyla caca0631 şunları yazdı:
Reply all
Reply to author
Forward
0 new messages