Build modified opencv source code

asked 2015-01-03 01:58:49 -0600

Aly Osama gravatar image

updated 2015-01-03 14:43:50 -0600

i want to fix a bug in function in imgproc so i try to edit source code in ( opencv/modules/imgproc/src/.. ) i write an output stream at the beginning of this function to check when i run the code if its my modified code or not

std::cout<<"My New Code"<<std::endl;

then i rebuild opencv and install it again

make 
sudo make install

when i try to use the function again , nothing appear on my screen . so how can i do this ? also if there is a good method that help me to fix any bug and see what have i changed ?

edit retag flag offensive close merge delete

Comments

cout is a buffered stream, so first try would be to add and << endl; or fflush(stdout)

"also if there is a good method that help me to fix any bug and see what have i changed ?" Do you want a comparison of the file before and after your changes? Diff (http://manpages.ubuntu.com/manpages/l...) could help you if you are not already in a git repository.

FooBar gravatar imageFooBar ( 2015-01-03 03:57:39 -0600 )edit

i try fflush(stdout) and endl but it didn't work

Aly Osama gravatar imageAly Osama ( 2015-01-03 05:03:25 -0600 )edit

can you check your cmake output again ? by default, the 'install' path is: your_opencv/build/install. if you did not change that, your code might not hit your updated libs.

berak gravatar imageberak ( 2015-01-03 15:04:24 -0600 )edit

i checked it , it was CMAKE_INSTALL_PREFIX:PATH=/usr/local so it think it hit my updated libs

Aly Osama gravatar imageAly Osama ( 2015-01-03 17:10:32 -0600 )edit