[libdc1394-devel] calling functions in dc1394_register.c (linking problems)
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: Aravind S. <ara...@um...> - 2006-05-11 16:26:13
|
Hi, I am using functions in dc1394_register.c to access registers in the camera. Currently I get linking problems. I have a file vendor_pixelink.c (like dc1394_vendor_avt.h) that uses functions in dc1394_register.c. g++ -g -O2 -Wall -I/opt/libdc1394-2.0.0-20060207/include/dc1394 -c -o vendor_pixelink.o vendor_pixelink.c compiles without any error. However g++ -g -O2 -Wall -I/opt/libdc1394-2.0.0-20060207/include/dc1394 -o trigger trigger.c options.o common.o vendor_pixelink.o -lm -lstdc++ -L/opt/libdc1394-2.0.0-20060207/lib/ -L/usr/local/lib -lraw1394 -ldc1394 has several linking problems such as the following. /opt/src/pixelink/trunk/vendor_pixelink.c:80: undefined reference to `GetCameraAdvControlRegister(__dc1394_camera*, unsigned long long, unsigned int*)' I get over the problem by duplicating dc1394_register.c in the current directory and creating dc1394_register.o and linking against it as follows g++ -g -O2 -Wall -I/opt/libdc1394-2.0.0-20060207/include/dc1394 -o trigger trigger.c options.o common.o vendor_pixelink.o dc1394_register.o -lm -lstdc++ -L/opt/libdc1394-2.0.0-20060207/lib/ -L/usr/local/lib -lraw1394 -ldc1394 Is there any way I can avoid duplicating these files? Thanks, Aravind. --=20 ________________________________________________________________________ Aravind Sundaresan PhD Candidate University of Maryland, College Park |