Build modified opencv source code
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 ?
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.
i try fflush(stdout) and endl but it didn't work
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.
i checked it , it was CMAKE_INSTALL_PREFIX:PATH=/usr/local so it think it hit my updated libs