I need to modify the UHD code and then need to make that code work with gnuradio-companion. For this, I built UHD from source and made the required modifications.
The next step would have been to build GNU Radio by source. But the installation steps mentioned in the tutorial do not seem to take UHD into account here. Also, the change in UHD is not being detected in an already installed version of GNU radio.
How do I make GNU Radio work with the modified UHD code?
you need to uninstall your currently installed GNU Radio, your currently installed UHD (make doubly sure you've removed both), then you need to install your self-built UHD, then build and install GNU Radio. Make sure not to accidentally install your operating system's UHD again!
You cannot make a GNU Radio that was built with a different version of UHD work with your version; you need to built it.