I have installed opencv in ubuntu 14.04 embedded version for ARM Soc. platforme Parallella.
I tried OpenCV with gcc and CMake documentation to run a basic C program.
Iniatialy I need CmakeLists.txt and DiplayImage.cpp and I type cmake
I received this error
make: *** No targets specified and no makefile found. Stop.
So I added the makefile
> linaro@linaro.nano:~/displayImage$ ls -l > w-rw-r-- l linaro linaro 1040 Jun 11 17:01 CmakeLists.txt > w-rw-r-- l linaro linaro 479 Jun 11 21:51 DisplayImage.cpp> w-rw-r-- l linaro linaro 171 Jun 11 21:39 DisplayImage.cpp~ > w-rw-r-- l linaro linaro 281 Jun 11 17:01 Makefile> w-rw-r-- l linaro linaro 40274 Jun 3 10:36 p.png>> linaro@linaro.nano:~/displayImage$ cmake > cmake version 2.8.12.2>> cmake [options] > ..etc..>> Options > -C = Pre-load a script to populate the cache.> -D := = Create a Cmake cache entry. ...etc..>>>> ...>> the following generators are available> on this platform: > Unix Makefiles =Generates standard Unix makefile > Ninja =... > CodeBlocks - Ninja =.. > CodeBlocks - Unix Makefiles > Eclipse CDT4 - Ninja > Eclipse CDT4 - Unix Makefiles> KDevelop3 KDevelop3 - Unix Makefiles> ..etc..>> linaro@linaro.nano:~/displayImage$ make > make: *** No rule to make target `example.o`, needed by `opencv_example`. Stop.>> So I added example.o file that I found in old Cmake example folder that comes when I install opencv library>> linaro@linaro.nano:~/displayImage$ make > g++ example.o -o opencv example -L/usr/local/lib -lopencv_shape -lopencv_stitchi -lobjdetect ..etc..> linaro@linaro.nano:~/displayImage$ ./DisplayImage p.png
doesn't work
I don't understand what is generated by make and why cmake needs example.o to work?
How can I run simply my code?
↧