Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why my opencv program failed to compile with static lib

I intend to use opencv2.4.11 static library for compilation, I have cross-compiled to generate a static library and dynamic library. But when I used static lib to compile my test program in the ubuntu operation, there happened errors (there was no problem with the dynamic library ), the problem was as follows: image description

The next picture is my Makefile: image description

Draw the red horizontal line is the location of my static library, the bottom of a few arrows are where I have inserted "-static" . And when I used the dynamic library compiler, it is possible to generate executable files. Here are the program folder and the static library folder: image description image description

I would like to ask you why my program occurred errors when I used a static library compiler(dynamic library is possible)?

Why my opencv program failed to compile with static lib

I intend to use opencv2.4.11 static library for compilation, I have cross-compiled to generate a static library and dynamic library. But when I used static lib to compile my test program in the ubuntu operation, there happened errors (there was no problem with the dynamic library ), the problem was as follows: image descriptionfollows:

chenyao@chenyao-OptiPlex-3020:~/code/test-arm$ make all /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++ -c -I/opt/arm/arm-opencv2.4.11/include test.cpp -O3 -Wno-deprecated
In file included from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/kmeans_index.h:50:0, from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/all_indices.h:38, from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/flann_base.hpp:44, from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/flann.hpp:50, from /opt/arm/arm-opencv2.4.11/include/opencv/cv.h:69, from test.cpp:3: /opt/arm/arm-opencv2.4.11/include/opencv2/flann/logger.h:73:9: note: the mangling of 'va_list' has changed in GCC 4.4 /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++ -L/opt/arm/arm-opencv2.4.11/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lpthread -lrt -ldl -o test test.o -O3 -Wno-deprecated
test.o: In function cv::Mat::~Mat()': test.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x78): undefined reference tocv::fastFree(void)' test.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x88): undefined reference to cv::Mat::deallocate()' test.o: In functionmain': test.cpp:(.text.startup+0x24): undefined reference to cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' test.cpp:(.text.startup+0x94): undefined reference tocv::_InputArray::_InputArray(cv::Mat const&)' test.cpp:(.text.startup+0xa0): undefined reference to cv::imshow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)' test.cpp:(.text.startup+0xb0): undefined reference tocv::waitKey(int)' collect2: ld returned 1 exit status make: ** [test] fault 1

The next picture text is my Makefile: image descriptionMakefile:

APPNAME = test

INCLUDES = -I/home/chenyao/opencv-arm/opencv-2.4.11/build/install/include

INCLUDES = -I/opt/arm/arm-opencv2.4.11/include

LIBDIRS = -L/home/chenyao/opencv-arm/opencv-2.4.11/build/install/lib #dynamic lib

LIBDIRS = -L/opt/arm/arm-opencv2.4.11/lib #static lib LIBS = -lopencv_core -lopencv_imgproc -lopencv_highgui -lpthread -lrt -ldl

OPT = -O3 -Wno-deprecated
CC = /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++

.PHONY: all clean

OBJS = $(APPNAME).o

clean:
rm -f *.o *~ $(APPNAME)

all:$(APPNAME)
echo all:make complete

%.o:%.cpp
$(CC) -c $(INCLUDES) $+ $(OPT)

$(APPNAME):$(OBJS)
$(CC) $(LIBDIRS) $(LIBS) -o $@ $+ $(OPT)

Draw the red horizontal line is the location of my static library, the bottom of a few arrows are where I have inserted "-static" . And when I used the dynamic library compiler, it is possible to generate executable files. Here are the program folder and the static library folder: image description image description

I would like to ask you why my program occurred errors when I used a static library compiler(dynamic library is possible)?

click to hide/show revision 3
None

updated 2017-09-21 03:38:20 -0600

berak gravatar image

Why my opencv program failed to compile with static lib

I intend to use opencv2.4.11 static library for compilation, I have cross-compiled to generate a static library and dynamic library. But when I used static lib to compile my test program in the ubuntu operation, there happened errors (there was no problem with the dynamic library ), the problem was as follows:

chenyao@chenyao-OptiPlex-3020:~/code/test-arm$ make all
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++   -c -I/opt/arm/arm-opencv2.4.11/include                               test.cpp -O3 -Wno-deprecated 
In file included from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/kmeans_index.h:50:0, from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/all_indices.h:38, from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/flann_base.hpp:44, from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/flann.hpp:50, from /opt/arm/arm-opencv2.4.11/include/opencv/cv.h:69, from test.cpp:3: /opt/arm/arm-opencv2.4.11/include/opencv2/flann/logger.h:73:9: note: the mangling of 'va_list' has changed in GCC 4.4 /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++ -L/opt/arm/arm-opencv2.4.11/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lpthread -lrt -ldl -o test test.o -O3 -Wno-deprecated
test.o: In function cv::Mat::~Mat()': `cv::Mat::~Mat()': test.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x78): undefined reference tocv::fastFree(void)' to `cv::fastFree(void*)' test.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x88): undefined reference to cv::Mat::deallocate()' `cv::Mat::deallocate()' test.o: In functionmain': function `main': test.cpp:(.text.startup+0x24): undefined reference to cv::imread(std::basic_string<char, `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' test.cpp:(.text.startup+0x94): undefined reference tocv::_InputArray::_InputArray(cv::Mat to `cv::_InputArray::_InputArray(cv::Mat const&)' test.cpp:(.text.startup+0xa0): undefined reference to cv::imshow(std::basic_string<char, `cv::imshow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)' test.cpp:(.text.startup+0xb0): undefined reference tocv::waitKey(int)' to `cv::waitKey(int)' collect2: ld returned 1 exit status make: ** *** [test] fault 1

1

The next text is my Makefile:

APPNAME  = test

test #INCLUDES = -I/home/chenyao/opencv-arm/opencv-2.4.11/build/install/include INCLUDES = -I/home/chenyao/opencv-arm/opencv-2.4.11/build/install/include

INCLUDES = -I/opt/arm/arm-opencv2.4.11/include

LIBDIRS #LIBDIRS = -L/home/chenyao/opencv-arm/opencv-2.4.11/build/install/lib #dynamic lib

lib LIBDIRS = -L/opt/arm/arm-opencv2.4.11/lib #static lib LIBS = -lopencv_core -lopencv_imgproc -lopencv_highgui -lpthread -lrt -ldl

-ldl OPT = -O3 -Wno-deprecated
CC = /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++

.PHONY: all clean

OBJS = $(APPNAME).o

clean:
rm -f *.o *~ $(APPNAME)

all:$(APPNAME)
echo all:make complete

%.o:%.cpp
$(CC) -c $(INCLUDES) $+ $(OPT)

$(APPNAME):$(OBJS)
$(CC) $(LIBDIRS) $(LIBS) -o $@ $+ $(OPT)

$(OPT)

Draw the red horizontal line is the location of my static library, the bottom of a few arrows are where I have inserted "-static" . And when I used the dynamic library compiler, it is possible to generate executable files.

I would like to ask you why my program occurred errors when I used a static library compiler(dynamic library is possible)?

Why my opencv program failed to compile with static lib

I intend to use opencv2.4.11 static library for compilation, I have cross-compiled to generate a static library and dynamic library. But when I used static lib to compile my test program in the ubuntu operation, there happened errors (there was no problem with the dynamic library ), the problem was as follows:

chenyao@chenyao-OptiPlex-3020:~/code/test-arm$ make all
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++   -c -I/opt/arm/arm-opencv2.4.11/include                               test.cpp -O3 -Wno-deprecated      
In file included from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/kmeans_index.h:50:0,
                 from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/all_indices.h:38,
                 from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/flann_base.hpp:44,
                 from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/flann.hpp:50,
                 from /opt/arm/arm-opencv2.4.11/include/opencv/cv.h:69,
                 from test.cpp:3:
/opt/arm/arm-opencv2.4.11/include/opencv2/flann/logger.h:73:9: note: the mangling of 'va_list' has changed in GCC 4.4
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++   -L/opt/arm/arm-opencv2.4.11/lib                                   -lopencv_core -lopencv_imgproc -lopencv_highgui -lpthread -lrt -ldl -o  test test.o -O3 -Wno-deprecated    
test.o: In function `cv::Mat::~Mat()':
test.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x78): undefined reference to `cv::fastFree(void*)'
test.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x88): undefined reference to `cv::Mat::deallocate()'
test.o: In function `main':
test.cpp:(.text.startup+0x24): undefined reference to `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
test.cpp:(.text.startup+0x94): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
test.cpp:(.text.startup+0xa0): undefined reference to `cv::imshow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)'
test.cpp:(.text.startup+0xb0): undefined reference to `cv::waitKey(int)'
collect2: ld returned 1 exit status
make: *** [test] fault 1

The next text is my Makefile:

APPNAME  = test
#INCLUDES = -I/home/chenyao/opencv-arm/opencv-2.4.11/build/install/include  
INCLUDES = -I/opt/arm/arm-opencv2.4.11/include                              
#LIBDIRS  = -L/home/chenyao/opencv-arm/opencv-2.4.11/build/install/lib      #dynamic lib
LIBDIRS **LIBDIRS  = -L/opt/arm/arm-opencv2.4.11/lib                                  #static lib
lib**

LIBS     = -lopencv_core -lopencv_imgproc -lopencv_highgui -lpthread -lrt -ldl

OPT      = -O3 -Wno-deprecated    
CC       = /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++  

.PHONY: all clean  

OBJS     = $(APPNAME).o  

clean:  
    rm -f *.o *~ $(APPNAME)  

all:$(APPNAME)  
    echo all:make complete  

%.o:%.cpp  
    $(CC) -c $(INCLUDES) $+ $(OPT)  

$(APPNAME):$(OBJS)  
    $(CC) $(LIBDIRS) $(LIBS) *A* -o  $@ $+ $(OPT)
*B* $@$+ *C* $(OPT) *D*

Draw the red horizontal line is The bold words are the location of my static library, library. These italics words A\B\C\D in the bottom of a few arrows are where I have inserted "-static" . And when I used the dynamic library compiler, it is possible to generate executable files.

I would like to ask you why my program occurred errors when I used a static library compiler(dynamic library is possible)?

Why my opencv program failed to compile with static lib

I intend to use opencv2.4.11 static library for compilation, I have cross-compiled to generate a static library and dynamic library. But when I used static lib to compile my test program in the ubuntu operation, there happened errors (there was no problem with the dynamic library ), the problem was as follows:

chenyao@chenyao-OptiPlex-3020:~/code/test-arm$ make all
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++   -c -I/opt/arm/arm-opencv2.4.11/include                               test.cpp -O3 -Wno-deprecated      
In file included from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/kmeans_index.h:50:0,
                 from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/all_indices.h:38,
                 from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/flann_base.hpp:44,
                 from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/flann.hpp:50,
                 from /opt/arm/arm-opencv2.4.11/include/opencv/cv.h:69,
                 from test.cpp:3:
/opt/arm/arm-opencv2.4.11/include/opencv2/flann/logger.h:73:9: note: the mangling of 'va_list' has changed in GCC 4.4
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++   -L/opt/arm/arm-opencv2.4.11/lib                                   -lopencv_core -lopencv_imgproc -lopencv_highgui -lpthread -lrt -ldl -o  test test.o -O3 -Wno-deprecated    
test.o: In function `cv::Mat::~Mat()':
test.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x78): undefined reference to `cv::fastFree(void*)'
test.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x88): undefined reference to `cv::Mat::deallocate()'
test.o: In function `main':
test.cpp:(.text.startup+0x24): undefined reference to `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
test.cpp:(.text.startup+0x94): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
test.cpp:(.text.startup+0xa0): undefined reference to `cv::imshow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)'
test.cpp:(.text.startup+0xb0): undefined reference to `cv::waitKey(int)'
collect2: ld returned 1 exit status
make: *** [test] fault 1

The next text is my Makefile:

APPNAME  = test
#INCLUDES = -I/home/chenyao/opencv-arm/opencv-2.4.11/build/install/include  
INCLUDES = -I/opt/arm/arm-opencv2.4.11/include                              
#LIBDIRS  = -L/home/chenyao/opencv-arm/opencv-2.4.11/build/install/lib      #dynamic lib
**LIBDIRS LIBDIRS  = -L/opt/arm/arm-opencv2.4.11/lib                                  #static lib**
************************#static lib

LIBS     = -lopencv_core -lopencv_imgproc -lopencv_highgui -lpthread -lrt -ldl

OPT      = -O3 -Wno-deprecated    
CC       = /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++  

.PHONY: all clean  

OBJS     = $(APPNAME).o  

clean:  
    rm -f *.o *~ $(APPNAME)  

all:$(APPNAME)  
    echo all:make complete  

%.o:%.cpp  
    $(CC) -c $(INCLUDES) $+ $(OPT)  

$(APPNAME):$(OBJS)  
    $(CC) $(LIBDIRS) $(LIBS) *A* -o *B* $@$+ *C* $(OPT) *D*

The bold words are fifth line is the location of my static library. These italics words A\B\C\D in the bottom of text are where I have inserted "-static" . And when I used the dynamic library compiler, it is possible to generate executable files.

I would like to ask you why my program occurred errors when I used a static library compiler(dynamic library is possible)?

click to hide/show revision 6
None

updated 2017-09-21 04:09:08 -0600

berak gravatar image

Why my opencv program failed to compile with static lib

I intend to use opencv2.4.11 static library for compilation, I have cross-compiled to generate a static library and dynamic library. But when I used static lib to compile my test program in the ubuntu operation, there happened errors (there was no problem with the dynamic library ), the problem was as follows:

chenyao@chenyao-OptiPlex-3020:~/code/test-arm$ make all
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++   -c -I/opt/arm/arm-opencv2.4.11/include                               test.cpp -O3 -Wno-deprecated      
In file included from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/kmeans_index.h:50:0,
                 from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/all_indices.h:38,
                 from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/flann_base.hpp:44,
                 from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/flann.hpp:50,
                 from /opt/arm/arm-opencv2.4.11/include/opencv/cv.h:69,
                 from test.cpp:3:
/opt/arm/arm-opencv2.4.11/include/opencv2/flann/logger.h:73:9: note: the mangling of 'va_list' has changed in GCC 4.4
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++   -L/opt/arm/arm-opencv2.4.11/lib                                   -lopencv_core -lopencv_imgproc -lopencv_highgui -lpthread -lrt -ldl -o  test test.o -O3 -Wno-deprecated    
test.o: In function `cv::Mat::~Mat()':
test.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x78): undefined reference to `cv::fastFree(void*)'
test.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x88): undefined reference to `cv::Mat::deallocate()'
test.o: In function `main':
test.cpp:(.text.startup+0x24): undefined reference to `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
test.cpp:(.text.startup+0x94): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
test.cpp:(.text.startup+0xa0): undefined reference to `cv::imshow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)'
test.cpp:(.text.startup+0xb0): undefined reference to `cv::waitKey(int)'
collect2: ld returned 1 exit status
make: *** [test] fault 1

The next text is my Makefile:

APPNAME  = test
#INCLUDES = -I/home/chenyao/opencv-arm/opencv-2.4.11/build/install/include  
INCLUDES = -I/opt/arm/arm-opencv2.4.11/include                              
#LIBDIRS  = -L/home/chenyao/opencv-arm/opencv-2.4.11/build/install/lib      #dynamic lib
LIBDIRS  = -L/opt/arm/arm-opencv2.4.11/lib                   ************************#static lib

LIBS     = -lopencv_core -lopencv_imgproc -lopencv_highgui -lpthread -lrt -ldl

OPT      = -O3 -Wno-deprecated    
CC       = /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++  

.PHONY: all clean  

OBJS     = $(APPNAME).o  

clean:  
    rm -f *.o *~ $(APPNAME)  

all:$(APPNAME)  
    echo all:make complete  

%.o:%.cpp  
    $(CC) -c $(INCLUDES) $+ $(OPT)  

$(APPNAME):$(OBJS)  
    $(CC) $(LIBDIRS) $(LIBS) *A* -o *B* $@$+ *C* $(OPT) *D*

The fifth line is the location of my static library. These A\B\C\D in the bottom of text are where I have inserted "-static" . And when I used the dynamic library compiler, it is possible to generate executable files.

I would like to ask you why my program occurred errors when I used a static library compiler(dynamic library is possible)?

[edit] new problems showing up:

/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++   -c -I/opt/arm/arm-opencv2.4.11/include                               test.cpp -O3 -Wno-deprecated      
In file included from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/kmeans_index.h:50:0,
                 from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/all_indices.h:38,
                 from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/flann_base.hpp:44,
                 from /opt/arm/arm-opencv2.4.11/include/opencv2/flann/flann.hpp:50,
                 from /opt/arm/arm-opencv2.4.11/include/opencv/cv.h:69,
                 from test.cpp:3:
/opt/arm/arm-opencv2.4.11/include/opencv2/flann/logger.h:73:9: note: the mangling of 'va_list' has changed in GCC 4.4
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++   test.o -L/opt/arm/arm-opencv2.4.11/lib                                   -lopencv_highgui -lopencv_imgproc -lopencv_core -lpthread -lrt -ldl -static -o test -O3 -Wno-deprecated    
/opt/arm/arm-opencv2.4.11/lib/libopencv_core.a(persistence.cpp.o): In function `icvGets(CvFileStorage*, char*, int)':
persistence.cpp:(.text._ZL7icvGetsP13CvFileStoragePci+0xec): undefined reference to `gzgets'
/opt/arm/arm-opencv2.4.11/lib/libopencv_core.a(persistence.cpp.o): In function `_ZL16icvYMLSkipSpacesP13CvFileStoragePcii.constprop.83':
persistence.cpp:(.text._ZL16icvYMLSkipSpacesP13CvFileStoragePcii.constprop.83+0x1e4): undefined reference to `gzeof'
/opt/arm/arm-opencv2.4.11/lib/libopencv_core.a(persistence.cpp.o): In function `icvPuts(CvFileStorage*, char const*)':
persistence.cpp:(.text._ZL7icvPutsP13CvFileStoragePKc+0x1d4): undefined reference to `gzputs'
/opt/arm/arm-opencv2.4.11/lib/libopencv_core.a(persistence.cpp.o): In function `icvXMLSkipSpaces(CvFileStorage*, char*, int)':
persistence.cpp:(.text._ZL16icvXMLSkipSpacesP13CvFileStoragePci+0x29c): undefined reference to `gzeof'
/opt/arm/arm-opencv2.4.11/lib/libopencv_core.a(persistence.cpp.o): In function `icvClose(CvFileStorage*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
persistence.cpp:(.text._ZL8icvCloseP13CvFileStoragePSs+0x1a4): undefined reference to `gzclose'
/opt/arm/arm-opencv2.4.11/lib/libopencv_core.a(persistence.cpp.o): In function `cvOpenFileStorage':
persistence.cpp:(.text.cvOpenFileStorage+0x994): undefined reference to `gzclose'
persistence.cpp:(.text.cvOpenFileStorage+0xa34): undefined reference to `gzopen'
persistence.cpp:(.text.cvOpenFileStorage+0xa64): undefined reference to `gzrewind'
persistence.cpp:(.text.cvOpenFileStorage+0x1370): undefined reference to `gzclose'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_tiff.cpp.o): In function `cv::TiffDecoder::TiffDecoder()':
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoderC2Ev+0x58): undefined reference to `TIFFSetErrorHandler'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoderC2Ev+0x64): undefined reference to `TIFFSetWarningHandler'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_tiff.cpp.o): In function `cv::TiffDecoder::close()':
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder5closeEv+0x14): undefined reference to `TIFFClose'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_tiff.cpp.o): In function `cv::TiffDecoder::readHeader()':
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder10readHeaderEv+0x1c): undefined reference to `TIFFOpen'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder10readHeaderEv+0x44): undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder10readHeaderEv+0x70): undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder10readHeaderEv+0x88): undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder10readHeaderEv+0xbc): undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder10readHeaderEv+0xcc): undefined reference to `TIFFGetField'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_tiff.cpp.o): In function `cv::TiffEncoder::writeLibTiff(cv::Mat const&, std::vector<int, std::allocator<int> > const&)':
grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0xf0): undefined reference to `TIFFOpen'
grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0x1b0): undefined reference to `TIFFSetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0x1c0): undefined reference to `TIFFClose'
grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0x200): undefined reference to `TIFFSetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0x218): undefined reference to `TIFFSetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0x230): undefined reference to `TIFFSetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0x248): undefined reference to `TIFFSetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0x260): undefined reference to `TIFFSetField'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_tiff.cpp.o):grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0x278): more undefined references to `TIFFSetField' follow
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_tiff.cpp.o): In function `cv::TiffEncoder::writeLibTiff(cv::Mat const&, std::vector<int, std::allocator<int> > const&)':
grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0x2c0): undefined reference to `TIFFScanlineSize'
grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0x324): undefined reference to `TIFFClose'
grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0x38c): undefined reference to `TIFFWriteScanline'
grfmt_tiff.cpp:(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE+0x3ac): undefined reference to `TIFFClose'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_tiff.cpp.o): In function `cv::TiffDecoder::readData(cv::Mat&)':
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0xbc): undefined reference to `TIFFIsTiled'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0xd4): undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x10c): undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x120): undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x168): undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x2a4): undefined reference to `TIFFGetField'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_tiff.cpp.o):grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x2c4): more undefined references to `TIFFGetField' follow
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_tiff.cpp.o): In function `cv::TiffDecoder::readData(cv::Mat&)':
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x308): undefined reference to `TIFFReadEncodedStrip'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x438): undefined reference to `TIFFReadEncodedStrip'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x644): undefined reference to `TIFFReadRGBAStrip'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x728): undefined reference to `TIFFReadRGBATile'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x750): undefined reference to `TIFFReadEncodedTile'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x758): undefined reference to `TIFFReadEncodedTile'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x7f0): undefined reference to `TIFFRGBAImageOK'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_jpeg.cpp.o): In function `_ZN2cvL16my_jpeg_load_dhtEP22jpeg_decompress_structPhPP9JHUFF_TBLS5_.constprop.41':
grfmt_jpeg.cpp:(.text.unlikely._ZN2cvL16my_jpeg_load_dhtEP22jpeg_decompress_structPhPP9JHUFF_TBLS5_.constprop.41+0xdc): undefined reference to `jpeg_alloc_huff_table'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_jpeg.cpp.o): In function `cv::JpegEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)':
grfmt_jpeg.cpp:(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0xbc): undefined reference to `jpeg_CreateCompress'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0xcc): undefined reference to `jpeg_std_error'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x21c): undefined reference to `jpeg_set_defaults'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x230): undefined reference to `jpeg_set_quality'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x240): undefined reference to `jpeg_start_compress'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x2d4): undefined reference to `jpeg_write_scanlines'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x2f0): undefined reference to `jpeg_finish_compress'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x300): undefined reference to `jpeg_destroy_compress'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x430): undefined reference to `jpeg_stdio_dest'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x4b4): undefined reference to `jpeg_write_scanlines'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x540): undefined reference to `jpeg_write_scanlines'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_jpeg.cpp.o): In function `cv::JpegDecoder::close()':
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder5closeEv+0x18): undefined reference to `jpeg_destroy_decompress'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_jpeg.cpp.o): In function `cv::JpegDecoder::readData(cv::Mat&)':
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder8readDataERNS_3MatE+0xe8): undefined reference to `jpeg_start_decompress'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder8readDataERNS_3MatE+0x1b4): undefined reference to `jpeg_read_scanlines'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder8readDataERNS_3MatE+0x228): undefined reference to `jpeg_finish_decompress'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_jpeg.cpp.o): In function `cv::JpegDecoder::readHeader()':
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder10readHeaderEv+0x28): undefined reference to `jpeg_std_error'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder10readHeaderEv+0x7c): undefined reference to `jpeg_CreateDecompress'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder10readHeaderEv+0xf0): undefined reference to `jpeg_stdio_src'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder10readHeaderEv+0x10c): undefined reference to `jpeg_read_header'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder10readHeaderEv+0x218): undefined reference to `jpeg_resync_to_restart'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_png.cpp.o): In function `cv::PngDecoder::readDataFromBuf(void*, unsigned char*, unsigned int)':
grfmt_png.cpp:(.text._ZN2cv10PngDecoder15readDataFromBufEPvPhj+0x14): undefined reference to `png_get_io_ptr'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder15readDataFromBufEPvPhj+0x170): undefined reference to `png_error'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_png.cpp.o): In function `cv::PngDecoder::close()':
grfmt_png.cpp:(.text._ZN2cv10PngDecoder5closeEv+0x4c): undefined reference to `png_destroy_read_struct'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_png.cpp.o): In function `cv::PngDecoder::readHeader()':
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x24): undefined reference to `png_create_read_struct'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x40): undefined reference to `png_create_info_struct'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x4c): undefined reference to `png_create_info_struct'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0xa4): undefined reference to `png_set_longjmp_fn'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x124): undefined reference to `png_init_io'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x17c): undefined reference to `png_read_info'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x1ac): undefined reference to `png_get_IHDR'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x26c): undefined reference to `png_set_read_fn'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x2b0): undefined reference to `png_get_tRNS'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_png.cpp.o): In function `cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)':
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x2c): undefined reference to `png_create_write_struct'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0xb0): undefined reference to `png_create_info_struct'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0xd8): undefined reference to `png_set_longjmp_fn'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x120): undefined reference to `png_set_write_fn'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x1ec): undefined reference to `png_set_compression_level'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x1fc): undefined reference to `png_set_compression_strategy'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x270): undefined reference to `png_set_IHDR'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x280): undefined reference to `png_write_info'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x294): undefined reference to `png_set_packing'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x2a0): undefined reference to `png_set_bgr'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x2c0): undefined reference to `png_set_swap'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x330): undefined reference to `png_write_image'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x340): undefined reference to `png_write_end'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x358): undefined reference to `png_destroy_write_struct'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x410): undefined reference to `png_init_io'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x488): undefined reference to `png_set_filter'
grfmt_png.cpp:(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x498): undefined reference to `png_set_compression_level'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_png.cpp.o): In function `cv::PngDecoder::readData(cv::Mat&)':
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x118): undefined reference to `png_set_longjmp_fn'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x1e0): undefined reference to `png_set_gray_to_rgb'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x1e8): undefined reference to `png_set_interlace_handling'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x1f4): undefined reference to `png_read_update_info'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x234): undefined reference to `png_read_image'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x240): undefined reference to `png_read_end'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x28c): undefined reference to `png_set_rgb_to_gray'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x294): undefined reference to `png_set_bgr'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x2a0): undefined reference to `png_set_strip_alpha'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x2ac): undefined reference to `png_set_swap'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x2c0): undefined reference to `png_set_expand_gray_1_2_4_to_8'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x2cc): undefined reference to `png_set_strip_16'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x2e0): undefined reference to `png_set_palette_to_rgb'
/opt/arm/arm-opencv2.4.11/lib/libopencv_highgui.a(grfmt_png.cpp.o): In function `cv::PngEncoder::writeDataToBuf(void*, unsigned char*, unsigned int)':
grfmt_png.cpp:(.text._ZN2cv10PngEncoder14writeDataToBufEPvPhj+0x24): undefined reference to `png_get_io_ptr'
collect2: ld returned 1 exit status
make: *** [test] 错误 1