2013-11-02 43 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

相关问题