2012-06-17 27 views
0

我正在使用VMware虛擬機(linux guest)在windows上編譯此應用程序,該應用程序在其他Linux機器上編譯。它有一個makefile並完成。然後我運行acgmake,它應該爲運行所需的所有文件。我得到這個錯誤:如何告訴acgmake使用-pthread?

Build executable Debian64_gcc4.6_dbg/libsrc_CadModel.so -> Debian64_gcc4.6_dbg/cadmodel 
/home///intel/mkl/10.2.2.025/lib/em64t/libiomp5.so: undefined reference  to `pthread_atfork' 

我發現我需要指定GCC(或其它)-pthread標誌。這是如何完成的?該ACGMakefile包含:(編輯:CadModel/ACGmakefile)

#== SYSTEM PART -- DON'T TOUCH ============================================== 
include $(ACGMAKE)/Config 
#============================================================================== 
CXX_CFLAGS += -DQT_THREAD_SUPPORT 

ifeq ($(findstring g++,$(CXX_COMP)),g++) 
CXX_CFLAGS += -Wno-write-strings -Wno-ignored-qualifiers 
CXX_LDFLAGS += -Xlinker --no-warn-search-mismatch 
endif 

SUBDIRS  = $(call find-subdirs) 
PACKAGES := ftgl opencascade qt4 glut opengl x11 math mkl 
PROJ_LIBS = OpenMesh/Core 
MODULES := moc4 rcc cxxlib cxx 

all: build 

info: 
@echo "Using compiler $(filter g++, $(CXX_COMP))" 
# @echo "CFLAGS = $(CXX_LDFLAGS)" 

#== SYSTEM PART -- DON'T TOUCH ============================================== 
include $(ACGMAKE)/Rules 
#============================================================================== 

run: $(cxx-exes) 
./$(cxx-exes) 
+0

是什麼CadModel/ACGmakefile是什麼樣子? –

+0

我編輯了我的問題。 – pazduha

回答

2

-lpthread-pthread是什麼連接需求。

您可能還需要告訴鏈接到哪裏尋找庫,如果他們沒有在LD_LIBRARY_PATH設置,與-L/path/to/lib選項。

1

嘗試增加-pthread

ifeq ($(findstring g++,$(CXX_COMP)),g++) 
CXX_CFLAGS += -Wno-write-strings -Wno-ignored-qualifiers -pthread 
CXX_LDFLAGS += -Xlinker --no-warn-search-mismatch -pthread 
endif
相關問題