我正在使用以下命令编译wxWidgets-3.1.0:
C:\wxWidgets-3.1.0\build\msw>mingw32-make -f makefile.gcc
if not exist ..\..\lib\gcc_lib\mswud mkdir ..\..\lib\gcc_lib\mswud
gcc -c -o gcc_mswud\wxtiff_tif_win32.o -g -O0 -mthreads -DHAVE_W32API_H -DNDEBUG -I..\..\src\zlib -I..\..\src\jpeg -I..\..\src\tiff\libtiff -MTgcc_mswud\wxtiff_tif_win32.o -MFgcc_mswud\wxtiff_tif_win32.o.d -MD -MP ../../src/tiff/libtiff/tif_win32.c
In file included from ../../src/tiff/libtiff/tiffio.h:257:0,
from ../../src/tiff/libtiff/tiffiop.h:59,
from ../../src/tiff/libtiff/tif_win32.c:30:
c:\mingw\include\stdio.h:345:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__mingw__snprintf'
extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...);
^
makefile.gcc:6018: recipe for target 'gcc_mswud\wxtiff_tif_win32.o' failed
mingw32-make: *** [gcc_mswud\wxtiff_tif_win32.o] Error 1
我看了link寻找解决方案,但没有帮助。
也跟着this,但得到了不同的错误:
c:\mingw\include\stdio.h:345:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__mingw__snprintf'
extern int __mingw_stdio_red.oirect]);_
^
E_(snprintf)(char*, size_t, const char*, ...);
^
rror 1
mingw32-make: *** Waiting for unfinished jobs....
Makefile.gcc:6024: recipe for target 'gcc_mswudll\wxtiff_tif_close.o' failed
mingw32-make: *** [gcc_mswudll\wxtiff_tif_close.o] Error 1
Makefile.gcc:6027: recipe for target 'gcc_mswudll\wxtiff_tif_codec.o' failed
mingw32-make: *** [gcc_mswudll\wxtiff_tif_codec.o] Error 1
Makefile.gcc:6030: recipe for target 'gcc_mswudll\wxtiff_tif_color.o' failed
mingw32-make: *** [gcc_mswudll\wxtiff_tif_color.o] Error 1
Makefile.gcc:6033: recipe for target 'gcc_mswudll\wxtiff_tif_compress.o' failed
mingw32-make: *** [gcc_mswudll\wxtiff_tif_compress.o] Error 1
Makefile.gcc:6018: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed
mingw32-make: *** [gcc_mswudll\wxtiff_tif_win32.o] Error 1
In file included from ../../src/tiff/Mlaikbtiffe/tiffio.h:257:0,
f fromi le.gcc:6036.:. recipe for target 'gcc_mswudll\wxtiff_tif_dir.o' faile/d
../srcm/tiff/libtiff/tiffiopi.h:59,
n g fromw ../../src/t3iff/libtiff/tif_dirinfo.c:31:
c2:\mi-ngw\include\stdio.h:345:12: error: expected 'm=', ','a, ';', 'kasme' o:r '__attribute__' before ' __m*ing*w__*snp rint[f'
extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...);
^
_mswudll\wxtiff_tif_dir.o] Error 1
Makefile.gcc:6039: recipe for target 'gcc_mswudll\wxtiff_tif_dirinfo.o' failed
mingw32-make: *** [gcc_mswudll\wxtiff_tif_dirinfo.o] Error 1
我为
设置了环境变量WXCFG=C:\wxWidgets-3.1.0\lib\gcc_dll\mswu
WXWIN=C:\wxWidgets-3.1.0