2016-08-13 26 views
-1

我需要用Qt 5.6更改julius library。 這是示例代碼生成文件:將生成文件配置轉換爲Qt 5

LIBSENT=../libsent 
LIBJULIUS=../libjulius 

CC=gcc 
CFLAGS=-g -O2 

#### 
#### When using system-installed libraries 
#### 
# CPPFLAGS=`libjulius-config --cflags` `libsent-config --cflags` 
# LDFLAGS=`libjulius-config --libs` `libsent-config --libs` 

#### 
#### When using within-package libraries 
#### 
CPPFLAGS=-I$(LIBJULIUS)/include -I$(LIBSENT)/include `$(LIBSENT)/libsent-config --cflags` `$(LIBJULIUS)/libjulius-config --cflags` 
LDFLAGS= -L$(LIBJULIUS) `$(LIBJULIUS)/libjulius-config --libs` -L$(LIBSENT) `$(LIBSENT)/libsent-config --libs` 

############################################################ 

all: julius-simple 

julius-simple: julius-simple.c 
    $(CC) $(CFLAGS) $(CPPFLAGS) -o julius-simple julius-simple.c $(LDFLAGS) 

clean: 
    $(RM) *.o *.bak *~ core TAGS 

distclean: 
    $(RM) *.o *.bak *~ core TAGS 
    $(RM) julius-simple 

這是我在我的項目的.pro:

LIBS +="/path/to/dir/libsent.a" \ 
     "/path/to/dir/libjulius.a" 

我怎樣才能清除錯誤?

+0

不要發佈'.pro'文件的screeshot,將文件的內容作爲代碼發佈。 –

回答

0

正確LIBS行應爲:

LIBS += -L/home/.../libsent -lsent 
LIBS += -L/usr/local/lib -ljulius 

更換...用正確的路徑,當然。

+0

感謝您的解決方案,但我仍然有錯誤! –