Hello.
I'm having some issues with conflicting typedefs between core MSYS/MingW
files and headers from its included libraries. Specifically, the DWORD
declaration in minwindef.h ends up being a 64 bit int, when it is supposed
to be (and declared to be in FreeImage) 32 bit. I was going to report this
as a bug, but on second thought, I think it could just be how I have things
set up causing the wrong typedefs to be invoked. I don't know enough about
the internals of this system to declare what is going on a bug.
To narrow where the problem is originating, it seems the __LP64__ macro is
not being set, thus causing the preprocessor macro in _mingw.h:
#ifndef __LP64__ /* 32 bit target, 64 bit Mingw target */
#define __LONG32 long
#else /* 64 bit Cygwin target */
#define __LONG32 int
#endif
to set __LONG32 to the incorrect value, that of a 64 bit integer (long).
FreeImage uses stdint.h's uint32_t, so it is the correct value no matter
what. Ergo, the two conflict.
I'm not sure why the __LP64__ macro is not being defined, though. I set my
build up using cmake with the command:
cmake -G "MSYS Makefiles"
and it found the proper 64 bit compiler (C:/msys2/mingw64/bin/g++.exe).
It's only during the build that I get an error from the
conflicting/incorrect typedef:
C:/msys2/mingw64/x86_64-w64-mingw32/include/minwindef.h:141:29: error:
conflicting declaration 'typedef long unsigned int DWORD'
typedef unsigned __LONG32 DWORD;
^
So, I have the 64 bit version of the compiler failing to identify itself,
or doing so in a way the headers are not receiving, thus causing the wrong
typedef to be declared, which conflicts with other headers.
For the record, I do not have any i686 packages installed. I totally
reinstalled my MSYS2 for fear of this being due to some sort of arch
conflict, but it does the exact same thing.
Are there any suggestions on what I should try?
:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
William E. Kappler II
LinkedIn <https://www.linkedin.com/in/williamkappler> · Blog
<http://williamkappler.blogspot.com/> · Project Website
<https://github.com/WilliamKappler/onathacar/wiki>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users