2013-04-09 57 views
0

目前我正在試圖建立用於Solaris第三方項目(QT 5.0.1)使用mkdtemp,我目前堅持以下錯誤:如何在solaris

io/qtemporarydir.cpp: In member function 'void QTemporaryDirPrivate::create(const QString&)': 
io/qtemporarydir.cpp:150:30: error: 'mkdtemp' was not declared in this scope 
gmake[3]: *** [.obj/release-shared/qtemporarydir.o] Error 1 

從我已經找到了,應在/ usr/include中的stdlib.h中找到mkdtemp。然而,在我的solaris系統上查看stdlib.h它不會定義mkdtemp方法。

有沒有人知道這個解決方法? (或者我如何編譯Qt for Solaris ...)

+0

參見我在Solaris下構建Qt 5.2的相關問題和答案:http://stackoverflow.com/q/20879715/427158 – maxschlepzig 2014-01-02 10:10:23

回答

1

我已經發現在Qt源代碼中有一個額外的函數,它替代了mkdtemp,用於沒有自己定義它的系統。但是它被包裝在一個#ifdef語句中,該語句沒有考慮Solaris版本。取消註釋固定該編譯的#ifdef包裝文件