undefined reference to symbol '_ZNK11GenICam_3_016GenericException17GetSourceFileNameEv'
阿新 • • 發佈:2018-09-29
specific nor pac lba stat rom weight sed i386
ifeq ($(ARCH), x86_64) ARCHNAME=x86_64 ARCH_GENICAM_BIN=Linux64_x64 ARCH_OPTIONS= -Dx86_64 -D_REENTRANT ARCH_GCCVER=421 else ARCHNAME=i386 ARCH_GENICAM_BIN=Linux32_i86
ARCH_OPTIONS= -D__i386__ -D_REENTRANT
ARCH_GCCVER=421
endif
# # Arch dependent GenICam library specification # GENICAM_ROOT_V3_0=/opt/genicam_v3_0 GENICAM_PATH_VERSION=v3_0 GENICAM_PATH:=$(GENICAM_ROOT_V3_0) GENICAM_LIBS=-L$(GENICAM_PATH)/bin/$(ARCH_GENICAM_BIN)\ -lGenApi_gcc$(ARCH_GCCVER)_$(GENICAM_PATH_VERSION)\
-lGCBase_gcc$(ARCH_GCCVER)_$(GENICAM_PATH_VERSION)
LDLIBS += $(GENICAM_LIBS)
INCLUDE += -I$(GENICAM_PATH)/bin/$(ARCH_GENICAM_BIN)
今天在編譯DALSA二次開發的源碼時,出現了如下錯誤:
/usr/bin/ld: ./out/camera.o: undefined reference to symbol ‘_ZNK11GenICam_3_016GenericException17GetSourceFileNameEv‘
//opt/genicam_v3_0/bin/Linux64_x64/libGCBase_gcc421_v3_0.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
需要的庫都(libGevApi)添加到makefile中去了,結果還是有這個錯誤出現。
經添加庫 libGCBase_gcc421_v3_0.so 問題解決。
makefile中添加信息如下:
ifndef ARCH ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/x86_64/x86_64/) endififeq ($(ARCH), x86_64) ARCHNAME=x86_64 ARCH_GENICAM_BIN=Linux64_x64 ARCH_OPTIONS= -Dx86_64 -D_REENTRANT ARCH_GCCVER=421 else ARCHNAME=i386 ARCH_GENICAM_BIN=Linux32_i86
# # Arch dependent GenICam library specification # GENICAM_ROOT_V3_0=/opt/genicam_v3_0 GENICAM_PATH_VERSION=v3_0 GENICAM_PATH:=$(GENICAM_ROOT_V3_0) GENICAM_LIBS=-L$(GENICAM_PATH)/bin/$(ARCH_GENICAM_BIN)\ -lGenApi_gcc$(ARCH_GCCVER)_$(GENICAM_PATH_VERSION)\
undefined reference to symbol '_ZNK11GenICam_3_016GenericException17GetSourceFileNameEv'