Qt 5的静态编译在mingw下面参考off64_t失败 [英] Static compilation of Qt 5 fails under mingw with reference to off64_t

查看:1664
本文介绍了Qt 5的静态编译在mingw下面参考off64_t失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使静态qt,并得到错误在mingw-make。这是错误的文本。

I tried to make static qt, and got error during mingw-make. This is text of error.

static\qhttpnetworkreply.o access\qhttpnetworkreply.cpp
In file included from ..\..\mkspecs\win32-g++/qplatformdefs.h:56:0,
             from access\qhttpnetworkreply_p.h:55,
             from access\qhttpnetworkreply.cpp:42:
c:\mingw\include\io.h:301:14: error: 'off64_t' does not name a type
__CRT_INLINE off64_t lseek64 (int, off64_t, int);
           ^
c:\mingw\include\io.h:302:14: error: 'off64_t' does not name a type
__CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) {
          ^
Makefile.Debug:8214: recipe for target '.obj/debug_static/qhttpnetworkreply.o' f   ailed
mingw32-make[3]: *** [.obj/debug_static/qhttpnetworkreply.o] Error 1
mingw32-make[3]: Leaving directory 'C:/Qt/Qt5.1.1/5.1.1/Src/qtbase/src/network'
Makefile:38: recipe for target 'debug-all' failed
mingw32-make[2]: *** [debug-all] Error 2
mingw32-make[2]: Leaving directory 'C:/Qt/Qt5.1.1/5.1.1/Src/qtbase/src/network'
Makefile:182: recipe for target 'sub-network-make_first' failed
mingw32-make[1]: *** [sub-network-make_first] Error 2
mingw32-make[1]: Leaving directory 'C:/Qt/Qt5.1.1/5.1.1/Src/qtbase/src'
Makefile:41: recipe for target 'sub-src-make_first' failed
mingw32-make: *** [sub-src-make_first] Error 2
C:\Qt\Qt5.1.1\5.1.1\Src\qtbase>

我使用Windows 8.1。

I use windows 8.1. I follow steps from one instructions.

推荐答案

这是MinGW中的一个错误,当-ansi,-std = c + +11,-std = c ++ 03和-std = c ++ 98。
in file {MinGW dir} /include/io.h replace

it is some bug in MinGW, when one of -ansi, -std=c++11, -std=c++03 and -std=c++98 are used. in file {MinGW dir}/include/io.h replace

__CRT_INLINE off64_t lseek64 (int, off64_t, int);
__CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) {

p>

with

__CRT_INLINE _off64_t lseek64 (int, _off64_t, int);
__CRT_INLINE _off64_t lseek64 (int fd, _off64_t offset, int whence) {

这篇关于Qt 5的静态编译在mingw下面参考off64_t失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆