Guys, I tried to compile an opencv code but got the issue with libjpeg, it's already compiled in Cmake but I can't find the library on /Build/lib/... the cmake on libjpeg : Scanning dependencies of target libjpeg [ 69%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcmaster.o [ 69%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jerror.o [ 70%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jmemansi.o [ 70%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jidctint.o [ 70%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdcoefct.o [ 70%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcomapi.o [ 70%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jquant2.o [ 70%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jutils.o [ 71%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcmainct.o /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jcmainct.c: In function 'start_pass_main': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jcmainct.c:71:15: warning: 'main' is usually a function /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jcmainct.c: In function 'process_data_simple_main': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jcmainct.c:117:15: warning: 'main' is usually a function /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jcmainct.c: In function 'jinit_c_main_controller': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jcmainct.c:247:15: warning: 'main' is usually a function [ 71%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jfdctint.o [ 71%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/transupp.o /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/transupp.c: In function 'jtransform_adjust_parameters': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/transupp.c:1305:3: warning: enumeration value 'JXFORM_NONE' not handled in switch /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/transupp.c:1305:3: warning: enumeration value 'JXFORM_FLIP_H' not handled in switch /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/transupp.c:1305:3: warning: enumeration value 'JXFORM_FLIP_V' not handled in switch /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/transupp.c:1305:3: warning: enumeration value 'JXFORM_ROT_180' not handled in switch /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/transupp.c: In function 'jtransform_perfect_transform': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/transupp.c:1431:3: warning: enumeration value 'JXFORM_NONE' not handled in switch /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/transupp.c:1431:3: warning: enumeration value 'JXFORM_TRANSPOSE' not handled in switch [ 71%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jidctred.o [ 71%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcprepct.o [ 71%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdapistd.o [ 72%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdcolor.o [ 72%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdmerge.o [ 72%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jfdctflt.o [ 72%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcapistd.o [ 72%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcsample.o [ 72%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jchuff.o [ 72%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdapimin.o [ 73%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jccoefct.o [ 73%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcparam.o [ 73%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcdctmgr.o [ 73%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdmainct.o /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c: In function 'alloc_funny_pointers': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c:162:15: warning: 'main' is usually a function /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c: In function 'make_funny_pointers': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c:203:15: warning: 'main' is usually a function /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c: In function 'set_wraparound_pointers': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c:243:15: warning: 'main' is usually a function /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c: In function 'set_bottom_pointers': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c:272:15: warning: 'main' is usually a function /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c: In function 'start_pass_main': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c:309:15: warning: 'main' is usually a function /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c: In function 'process_data_simple_main': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c:349:15: warning: 'main' is usually a function /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c: In function 'process_data_context_main': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c:389:15: warning: 'main' is usually a function /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c: In function 'jinit_d_main_controller': /root/Download/OpenCV-2.1.0/3rdparty/libjpeg/jdmainct.c:478:15: warning: 'main' is usually a function [ 73%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdphuff.o [ 73%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdsample.o [ 74%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdmaster.o [ 74%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdhuff.o [ 74%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdatadst.o [ 74%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcinit.o [ 74%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jidctflt.o [ 74%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdinput.o [ 75%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jidctfst.o [ 75%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdatasrc.o [ 75%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jmemmgr.o [ 75%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jccolor.o [ 75%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jddctmgr.o [ 75%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdtrans.o [ 76%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcmarker.o [ 76%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdpostct.o [ 76%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcphuff.o [ 76%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jdmarker.o [ 76%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jfdctfst.o [ 76%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcapimin.o [ 76%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jquant1.o [ 77%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jctrans.o Linking C static library ../lib/liblibjpeg.a [ 77%] Built target libjpeg compiling test.c : [root@localhost opencv]# arm-linux-g++ -I/root/Download/OpenCV-2.1.0/include/opencv -L/root/Download/OpenCV-2.1.0/Build/lib -L/path/to/opencv_folder/build/3rdparty/lib test.c -o test -lcv -lcxcore -lcvaux -lhighgui -lml -llibjpeg -llibpng -lpthread -lz -lopencv_lapack -lrt /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../ ../arm-none-linux-gnueabi/bin/ld: cannot find -llibjpeg collect2: ld returned 1 exit status any ideas ? thanks