[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - compile and run basic opencv program in C in ubuntu linaro

compile and run basic opencv program in C in ubuntu linaro

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

compile and run basic opencv program in C in ubuntu linaro

Postby Riwa » Sun Aug 16, 2015 9:47 pm

Riwa
 
Posts: 7
Joined: Sat Mar 14, 2015 4:55 pm

Re: compile and run basic opencv program in C in ubuntu lina

Postby sebraa » Mon Aug 17, 2015 11:33 am

Cmake is a high-level build tool, which produces Makefiles (among others) from CMakeLists.txt specifying your code for you.
You have to call it with the path to the directory containing the CMakeLists.txt, so call it with "cmake ." (include the dot).
Then it should generate a Makefile, which you utilize by doing "make".
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

Re: compile and run basic opencv program in C in ubuntu lina

Postby Riwa » Mon Aug 17, 2015 1:03 pm

Riwa
 
Posts: 7
Joined: Sat Mar 14, 2015 4:55 pm

Re: compile and run basic opencv program in C in ubuntu lina

Postby sebraa » Mon Aug 17, 2015 1:39 pm

The Makefile contains a rule to create a .o-file from a .cpp file.
So if it says that there is no rule to make "example.o" then that tells you that there is no "example.cpp" file.

Note: A .o-file is a binary, already-compiled file. So you should never copy a .o-file to fix a build.

This file is listed in your CMakeLists.txt as well. So if you have your code in "foo.cpp", then update your CMakeLists.txt to reference foo.cpp, then run "cmake ." to create a new Makefile, then run "make" to build your program.
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 7 guests