complie error of invernal.c on MinGW64 32 bit build
gcc -c -I/c/Programs/gplibs32_gcc530/include -fno-keep-inline-dllexport -D_FILE_OFFSET_BITS=64 -D__USE_MINGW_ANSI_STDIO -DDEFAULTTERM=\"wxt\" -DHAVE_FINDVERSION_H -m32 -O2 -pipe -I. -I../../src -I../../term/ -D_Windows -DHAVE_CONFIG_H -DPIPES -DWGP_CONSOLE -DCONSOLE_SWITCH_CP -D__USE_MINGW_ANSI_STDIO=1 -DGNUPLOT_SHARE_DIR=\"share\" -DDEVELOPMENT_VERSION -DUSE_MOUSE=1 -DWIN_IPC -I/c/Program\ Files\ \(x86\)/HTML\ Help\ Workshop/include -DHAVE_LIBGD -DHAVE_LIBPNG -DHAVE_LIBGD -DHAVE_GD_H -DHAVE_GD_GIF -DGIF_ANIMATION -DHAVE_GD_PNG -DHAVE_GD_JPEG -DHAVE_GD_TTF -DHAVE_CAIROPDF -DWXWIDGETS -DQTTERM -DQT_NO_OPENGL -DHAVE_LUA -DHAVE_LIBCACA -DHAVE_ICONV -DHAVE_LIBCERF -DNEED_CEXP -MMD -MT 'internal.$(O)' -MF internal.d -o internal.co ../../src/internal.c
In file included from ../../src/internal.h:42:0,
from ../../src/internal.c:38:
../../src/syscfg.h:342:21: warning: '_matherr' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
# define GP_MATHERR _matherr
^
../../src/internal.c:67:1: note: in expansion of macro 'GP_MATHERR'
GP_MATHERR( STRUCT_EXCEPTION_P_X )
^
../../src/internal.c: In function '_matherr':
../../src/internal.c:68:1: error: number of arguments doesn't match prototype
{
^
In file included from ../../src/stdfn.h:291:0,
from ../../src/internal.c:40:
C:/msys64_gcc530/mingw32/i686-w64-mingw32/include/math.h:286:23: error: prototype declaration
_CRTIMP int __cdecl _matherr (struct _exception *);
#ifndef _WIN64
/*
* FIXME: This is almost certainly out of date on linux, since the matherr
* mechanism has been replaced by math_error() and supposedly is only
* enabled via an explicit declaration #define _SVID_SOURCE.
*/
/*
* Excerpt from the Solaris man page for matherr():
*
* The The System V Interface Definition, Third Edition (SVID3)
* specifies that certain libm functions call matherr() when
* exceptions are detected. Users may define their own mechan-
* isms for handling exceptions, by including a function named
* matherr() in their programs.
*/
int
GP_MATHERR( STRUCT_EXCEPTION_P_X )
{
return (undefined = TRUE); /* don't print error message */
}
#endif
The part
int
GP_MATHERR( STRUCT_EXCEPTION_P_X )
{
return (undefined = TRUE); /* don't print error message */
}
shuold not be also applied MinGW64 32bit complier.
Thus
#ifndef _WIN64
shoule be modified.
However I have forgotten to proper altertive to excude also MinGW64 32bit complier.
Workaound is
#if 0 //workaround for MinGW64 32 bit compliler
#ifndef _WIN64
/*
* FIXME: This is almost certainly out of date on linux, since the matherr
* mechanism has been replaced by math_error() and supposedly is only
* enabled via an explicit declaration #define _SVID_SOURCE.
*/
/*
* Excerpt from the Solaris man page for matherr():
*
* The The System V Interface Definition, Third Edition (SVID3)
* specifies that certain libm functions call matherr() when
* exceptions are detected. Users may define their own mechan-
* isms for handling exceptions, by including a function named
* matherr() in their programs.
*/
int
GP_MATHERR( STRUCT_EXCEPTION_P_X )
{
return (undefined = TRUE); /* don't print error message */
}
#endif
#endif // #if 0
Of cource this is temporal, so I will search the proper way.
Diff:
Diff:
__MINGW64_VERSION_MAJOR indecates MinGW w64 regardless 32 bit or 64 bit
This is off topic but releted to MinGW 32 bit build for QT.
The above adds the consistency to the treatment on EXTRADIST in config/mingw/Makefile.
I have created a pacth that inclues two modifications and attached it.
Both applied to CVS. I also re-enabled it for MSVC in any case, since there it is actually supported.