主题 : Ubuntu 10.04编译qtopia 错误 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 40367
精华: 0
发帖: 31
金钱: 155 两
威望: 31 点
综合积分: 62 分
注册时间: 2011-03-17
最后登录: 2011-04-20
楼主  发表于: 2011-03-18 11:06

 Ubuntu 10.04编译qtopia 错误

In function ‘int open(const char*, int, ...)’,
    inlined from ‘QMemoryFileData* QMemoryFile::openData(const QString&, int, uint)’ at ../../libraries/qtopia/qmemoryfile_unix.cpp:141:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[6]: *** [.obj/release-shared/qmemoryfile_unix.o] Error 1
make[6]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src/tools/qdawggen'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src/tools/qdawggen'
make[4]: *** [sub-tools-qdawggen] Error 2
make[4]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src'
make[3]: *** [sub-src-components_pro] Error 2
make[3]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia'


解决办法:

    if (!f)
        f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY);    
修改为
    if (!f)
        f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY, 0666);  
按照网上说的修改了但是依然编译不通过求高手指教

级别: 新手上路
UID: 41676
精华: 0
发帖: 16
金钱: 80 两
威望: 16 点
综合积分: 32 分
注册时间: 2011-03-31
最后登录: 2011-05-13
1楼  发表于: 2011-03-31 16:20
直接改成0777试下。
级别: 新手上路
UID: 40367
精华: 0
发帖: 31
金钱: 155 两
威望: 31 点
综合积分: 62 分
注册时间: 2011-03-17
最后登录: 2011-04-20
2楼  发表于: 2011-04-03 13:41
可以了 这个问题在修改后不要直接 make  要重新 config 一次再make就好了··