“fseeko64未在此范围内声明”(mingw,windows)

时间:2013-09-18 20:03:25

标签: c++ mingw

尝试使用MINGW编译此c ++代码

#include <stdio.h>

int main ()
{
    FILE * pFile;
    char file_name[100] = "test";
    pFile = fopen (file_name,"rb");
    fseeko64(pFile, 0, SEEK_END);
    long long file_dim = ftello64 (pFile);
    printf ("File:\n%s\ncontains %I64d bytes:\n", file_name, file_dim);
    return 0;
}

总是得到

'fseeko64' was not declared in this scope
'ftello64' was not declared in this scope

为什么呢?怎么了?

更新:

我找到了理由:“ - std = c ++ 11”开关给出了这个! “-std = gnu ++ 11”确定

0 个答案:

没有答案