i am following Starting with opencv in IMX6 processors in toradex website
i have done till here below… i created a src directory in my_project folder…
mkdir src
gedit src/myApp.cpp
#include <iostream>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
int main(int argc, char** argv ){
cout << "OpenCV version: " << CV_MAJOR_VERSION << '.' << CV_MINOR_VERSION << "\n";
if ( argc != 2 ){
cout << "usage: ./myApp \n";
return -1;
}
Mat image;
image = imread( argv[1], 1 );
if ( !image.data ){
cout << "No image data \n";
return -1;
}
bitwise_not(image, image);
namedWindow("Display Image", WINDOW_AUTOSIZE );
imshow("Display Image", image);
waitKey(0);
return 0;
}
After this i have run the command “make”. And the following errors have occured…
bmit@bmit-HP:~/my_project$ make
Scanning dependencies of target myApp
[100%] Building CXX object CMakeFiles/myApp.dir/src/myApp.cpp.o
Linking CXX executable bin/myApp
/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/real-ld: error: cannot open /lib/libc.so.6: No such file or directory
/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/real-ld: error: cannot open /usr/lib/libc_nonshared.a: No such file or directory
/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/5.2.1/real-ld: error: cannot open /lib/ld-linux-armhf.so.3: No such file or directory
../sysdeps/arm/start.S:124: error: undefined reference to '__libc_start_main'
../sysdeps/arm/start.S:128: error: undefined reference to 'abort'
../sysdeps/arm/start.S:113: error: undefined reference to '__libc_csu_fini'
../sysdeps/arm/start.S:120: error: undefined reference to '__libc_csu_init'
/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/usr/include/c++/5.2.1/bits/char_traits.h:267: error: undefined reference to 'strlen'
/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/usr/include/c++/5.2.1/bits/char_traits.h:290: error: undefined reference to 'memcpy'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/myApp] Error 1
make[1]: *** [CMakeFiles/myApp.dir/all] Error 2
make: *** [all] Error 2
bmit@bmit-HP:~/my_project$ ^C
bmit@bmit-HP:~/my_project$ ^C
bmit@bmit-HP:~/my_project$
Please solve this.