具體錯誤:
checking if we can compile and link with freetype... no
configure: Could not compile and link with freetype. This might be a 32/64-bit mismatch.
之前遇到同類問題:
https://blog.csdn.net/weixin_45021036/article/details/102691495檢查了一下,确認庫是64位的,怎麼又出現了?于是檢查了報錯位置:
# Try to compile it
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
$as_echo_n "checking if we can compile and link with freetype... " >&6; }
#include<ft2build.h>
#include FT_FREETYPE_H
int main () {
FT_Init_FreeType(NULL);
return 0;
}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
這裡意思是檢查一下庫是否正常。庫肯定正常,那就是頭檔案有問題?這個頭檔案為了在MAC上編譯,加了幾個包含。于是進行了反複測試,原來是包含的unistd.h導緻。
1.
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <math.h>
/* #include <unistd.h> */
#include <freetype/config/ftheader.h>