Boost logo

Boost Users :

Subject: [Boost-users] icc ULONG_MAX/UINT_MAX vs msvc ULONG_MAX/UINT_MAX
From: Hai Nguyen (chaoticbob_at_[hidden])
Date: 2010-11-23 11:16:08


Hi,

I'm running into a case where the Intel compiler is seeing mt19937 as:

typedef random::mersenne_twister< unsigned long, 32, 624, 397, 31,
0x9908b0df, 11, 7, 0x9d2c5680, 15, 0xefc60000, 18, 3346425566U > mt19937;

and MSVC is seeing it as:

typedef random::mersenne_twister< unsigned int, 32, 624, 397, 31,
0x9908b0df, 11, 7, 0x9d2c5680, 15, 0xefc60000, 18, 3346425566U > mt19937;

...it's defined as:

typedef random::mersenne_twister< uint32_t, 32, 624, 397, 31, 0x9908b0df,
11, 7, 0x9d2c5680, 15, 0xefc60000, 18, 3346425566U > mt19937;

This is leading to a link time problem. I'm a bit lost as to what to do
since the lib I'm depending on is compiled with the Intel compiler and my
client program is using MSVC.

>From my very brief look - it seems that uint32_t is controlled via ULONG_MAX
and UINT_MAX - I was wondering if someone could shed some light on how the
Intel compiler handles ULONG_MAX and UINT_MAX. I couldn't find its limits.h
to figure out what it was doing. Also - is there a work around for cases
like this?

Thanks,
Hai



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net