[BuildTools] cross-compile coin-cbc using mingw

Patrik Dufresne ikus060 at gmail.com
Mon Sep 9 14:32:29 EDT 2013


Hum,

This fact didn't come to my mind. It is strange...
If stdint.h is not include when compiling with mingw on windows 32bits,
where is int64_t defined?

--
Patrik Dufresne



On Mon, Sep 9, 2013 at 2:27 PM, Ted Ralphs <ted at lehigh.edu> wrote:

> OK, but I don't understand why you need to include stdint.h when compiling
> with 32-bit MINGW. This is not the case when you build on Windows. That's
> the reason why __MINGW64__ is used there.
>
> Ted
>
>
> On Mon, Sep 9, 2013 at 2:15 PM, Patrik Dufresne <ikus060 at gmail.com> wrote:
>
>> Hi Ted,
>>
>> Just to clarify, I'm the one who report the bug. Replacing __MINGW64__
>> by __MINGW32__ is working as expected ans seams to be the long-term
>> solution. __MINGW32__ and __MINGW64__ is defined by the ming-w64
>> compiler when the target is x86_64. __MINGW32__ is defined by the
>> ming-w64 and mingw32 compilers. As I understand, __MINGW32__ should be
>> used whenever the code is specific for mingw whatever it's 32 or 64 bits. __MINGW64__
>> should be used only when the code is not the same for a 64bits target.
>>
>> In any case, if you compile for 32bits target, you need to include <stdint.h>
>> either by removing the #ifdef #endif as suggest in the bug or by
>> replacing __MINGW64__ by __MINGW32__.
>>
>>
>>
>> --
>> Patrik Dufresne
>>
>>
>>
>> On Mon, Sep 9, 2013 at 2:05 PM, Ted Ralphs <ted at lehigh.edu> wrote:
>>
>>>
>>>
>>>
>>> On Mon, Sep 9, 2013 at 1:45 PM, Patrik Dufresne <ikus060 at gmail.com>wrote:
>>>
>>>> Hi Ted,
>>>>
>>>> Stefan (see https://projects.coin-or.org/BuildTools/ticket/103)
>>>> suggests to remove #ifdef __MINGW64__.
>>>>
>>>
>>> That's not really a long-term solution, though---just to see if it
>>> works. In the long-term, we need to have a #define there or stdint.h will
>>> get included for other compilers, which it shouldn't.
>>>
>>>
>>>> I ended up replacing it by #ifdef __MINGW32__ to have the same code
>>>> base work for linux and windows 32bits and 64 bits.
>>>>
>>>
>>> Well, this is the problem then I guess. It didn't work with __MINGW64__?
>>> The reporter of the bug said that what is not working is building MinGW
>>> 32-bit from 64-bit Linux. If both are 64-bit, it worked for him. So now I'm
>>> a little confused about exactly what problem you're having. Did you try
>>> with unmodified code first?
>>>
>>> Ted
>>> --
>>> Dr. Ted Ralphs
>>> Associate Professor, Lehigh University
>>> (610) 628-1280
>>> ted 'at' lehigh 'dot' edu
>>> coral.ie.lehigh.edu/~ted
>>>
>>
>>
>
>
> --
> Dr. Ted Ralphs
> Associate Professor, Lehigh University
> (610) 628-1280
> ted 'at' lehigh 'dot' edu
> coral.ie.lehigh.edu/~ted
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/buildtools/attachments/20130909/276b7549/attachment.html>


More information about the BuildTools mailing list