Comments (5)
I tried compiling this on unix, and it worked fine. So I believe the problem is
likely that some windows header file somewhere is defining min. This post
suggests
it's windows.h:
https://www-old.cae.wisc.edu/pipermail/octave-maintainers/2007-February/001812.html
But it's hard for me to believe you wouldn't have seen this problem before,
because
other code -- perhaps code you've written -- must include windows.h as well! So
maybe it's somewhere else?
Try this: edit src/windows/google/sparseconfig.h, and after the line
#include <windows.h>
add the lines
#undef min
#undef max
Does this fix the problem for you?
Original comment by [email protected]
on 24 Feb 2009 at 7:22
- Added labels: Priority-Medium, Type-Defect
from sparsehash.
Hi,
Your correction fixed the problem. We hadn't the problem before because we never
include windows.h. Moreover, i've seen that it is in windef.h (included from
windows.h ) that min and max macros are defined.
Thank you very much
Laurent
Original comment by L.VanMiegroet
on 25 Feb 2009 at 10:21
from sparsehash.
Hmm, I'm not sure what to do about this. I can't just #undef min in my .h file,
since folks may write windows programs that legitimately depend on the 'min' in
winbase.h. I don't want their code to break when they include one of the
sparsehash
header files.
On the other hand, sparsehash needs some of the code in windows.h to work
properly.
The basic problem is that a fundamental windows header file defines macros with
common names like min and max; but there's nothing we can do about that now.
:-( I
think you may have to just keep the #undef min as a local change. I'll look
into
whether there's anything better we can do.
Original comment by [email protected]
on 25 Feb 2009 at 8:34
- Changed state: Accepted
from sparsehash.
On further investigation, it looks like sparsehash doesn't need windows.h after
all.
So I just removed the #include entirely. This should be fixed in the next version
of sparsehash.
Original comment by [email protected]
on 25 Feb 2009 at 8:42
- Changed state: Started
from sparsehash.
This should be fixed in sparsehash 1.5, just released.
Original comment by [email protected]
on 7 May 2009 at 3:10
- Changed state: Fixed
from sparsehash.
Related Issues (20)
- Memory Corruption HOT 2
- Compile fails on up-to-date Fedora 18 system HOT 2
- Insert deleted key into hashmap will cause size() be increased
- Cannot compile sparsehash-2.0.2 on Ubuntu 12.04LTS
- [PATCH] Fix gcc warning: format '%p' expects argument of type 'void*'
- news page specifies wrong date
- clang compile failure on FreeBSD HOT 3
- failure during "make" of sparsehash on mac osx 10.8.5 HOT 1
- Please implement a check for try in case libstdc++ implements c++11 where tr1 is merged into std HOT 4
- Latest version of xcode Command Line tools breaks sparsehash. HOT 6
- Fix the compile problem's on llvm(macosx) HOT 1
- Call resize to preallocate for memory does not work
- SPARSEHASH_COMPILE_ASSERT HOT 2
- Repair compilation with clang
- Installation fails check on Red Hat 6
- Installation fails at "make" step on Red Hat Linux 6
- make check fails with GCC 4.9 on Mac OS 10.10.1
- [PATCH] Make dense_hash_map work with non-default-constructible values HOT 1
- Is it thread safe for insertion of sparse hash table? HOT 1
- Google Code is dying
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sparsehash.