2013-11-02 42 views
0

我想編譯下面的程序,使得FASTA序列比對,該方案可供選擇:如何編譯和運行這個程序,pthread問題?

http://compbio.cs.princeton.edu/mems/

我已經下載了所謂的sparseMEM一個zip文件,並下載了G ++在Ubuntu Linux操作系統,在目錄中創建了一個Makefile存檔,所以我試圖用make進行編譯。問題是我得到以下錯誤:

g++ -lpthread -O3 -DSIXTYFOURBITS mummer.o qsufsort.o sparseSA.o fasta.o -o mummer 
mummer.o: In function `main': 
mummer.cpp:(.text.startup+0x480): undefined reference to `pthread_create' 
mummer.cpp:(.text.startup+0x4a8): undefined reference to `pthread_join' 
sparseSA.o: In function `sparseSA::MEM(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::vector<match_t, std::allocator<match_t> >&, int, bool, int)': 
sparseSA.cpp:(.text+0x3bbc): undefined reference to `pthread_create' 
sparseSA.cpp:(.text+0x3be0): undefined reference to `pthread_join' 
collect2: ld returned 1 exit status 
make: *** [mummer] Error 1 

我該如何讓它運行?

也如果有人知道如何測試這個程序將是巨大的

感謝

+2

刪除'-lpthread'。添加'-pthread'。 –

+0

使用-l選項指定的庫總是應該出現在.o文件之後,這裏的順序很重要。 –

回答

0

對於Linux,你需要-pthread代替-lpthread

相關問題