jirzynek / sparsehash

Automatically exported from code.google.com/p/sparsehash
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

hash_map: No such file or directory #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello
I'm using GCC on Windows. I opened "google-sparsehash.sln" with
Code::Blocks and tried to compile it. It gives these errors:

hash_map: No such file or directory
'stdext' has not been declared
'hash_compare' has not been declared
(and a lot of other irrelevant errors)

What should I do?

Original issue reported on code.google.com by gsau...@gmail.com on 18 Dec 2008 at 7:49

GoogleCodeExporter commented 9 years ago
I'm currently using hash_map, applying what I found here:
http://zitronensaft.blogspot.com/2008/02/using-hashmap-on-gcc.html

perhaps I think sparsehash is an interesting alternative

Original comment by gsau...@gmail.com on 18 Dec 2008 at 8:24

GoogleCodeExporter commented 9 years ago
I don't know very much about windows -- I didn't even know it was possible to 
use gcc
on windows with .sln files.  I guess Code::Blocks is some magic program that 
lets you
do that?

I'm not sure what your build environment is, but if you're using gcc on 
windows, the
best solution is to run ./configure && make, just like in unix environments.  
You'll
need cygwin or msys or some other unix-like environment to do that though.

If that's not practical, you'll need to modify the source code to change some 
of the
_WIN32 stuff to look for _MSC_VER instead.  I'll take a look at that when I get 
a
chance, but I don't have a good environment for testing it.

Original comment by csilv...@gmail.com on 3 Jan 2009 at 1:41

GoogleCodeExporter commented 9 years ago

Original comment by csilv...@gmail.com on 3 Jan 2009 at 4:29

GoogleCodeExporter commented 9 years ago
It looks like all the WIN32 code in in src/windows/port.h, which is 
appropriate. 
That file is used by the .sln file, so presumably Code::Blocks is picking it up 
from
there.  You will need to hack src/windows/sparseconfig.h, as well as the other 
files
in that directory, to be appropriate for windows.  (Though if possible, you'd be
better off using './configure && make' and bypassing the src/windows directory
altogether.)

I haven't thought much about how to compile in a windows environment using a 
non-msvc
compiler.  If you'd like to make patches to make that work -- probably changes 
to
windows/port.h and port.cc -- feel free to post them here!  But I'm going to 
close
the bug WontFix for now.

Original comment by csilv...@gmail.com on 5 Jan 2009 at 9:22

GoogleCodeExporter commented 9 years ago
Thank you for the answers.
I'm currently busy with other things, but maybe I try it sometime.

Original comment by gsau...@gmail.com on 6 Jan 2009 at 1:48