Re: Home dir changes have broken MSVC builds

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Home dir changes have broken MSVC builds
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE476543@algol.sollentuna.se
обсуждение исходный текст
Ответ на Home dir changes have broken MSVC builds  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Home dir changes have broken MSVC builds  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
>>>The trouble seems to come from these 2 lines:
>>>
>>>+ #define _WIN32_IE 0x0400
>>>+ #include <shlobj.h>
>>>
>>>First, on MSVC, _WIN32_IE is already defined at that point.
>If you get
>>>around that then processing the include file causes errors.
>>>
>>>
>>
>>Interesting - mingw was supposed to use compatible headers, I thought
>>:-)
>>Can you tru moving the #define up to the top of the file and
>see if that
>>fixes things? So it's pulled before *any* windows include
>file. (My msvc
>>has completely stopped building fromt he commandline. Need to
>fix that,
>>but it's not up right now)
>>
>>
>I surrounded the #define with #ifndef ... #endif. If you agree that
>would be the first fix.
>
>But most errors remained (see my follow up email yesterday)
>
>The error appears to be on line that uses NEAR and complains about it
>... I see that the MinGW windef.h defines NEAR as empty, while
>the MSVC
>windef.h defines it as "near". Don't know if that makes a difference.

Some reading up on MSDN gives this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore9
8/html/_core_removing_near_and_far_type_declarations.asp

From what I can tell, NEAR is defined to near, which is then defined to
blank in my windef.h (from the platform SDK included in VS2003)

Could it be that we need to include windef.h explicitly, before we
include this one? Worth a try.

//Magnus


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Home dir changes have broken MSVC builds
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Home dir changes have broken MSVC builds