I have built OTB 8.0 from source code on Windows-10, MS Visual Studio 2019
details, it works well.
Now I modified “C:\otb8\src\Modules\Applications\AppSARUtils\app\ otbDespeckle.cxx”. I am curious how I can ONLY re-build and install “C:\otb8\install_Releasex64\lib\otb\applications\otbapp_Despeckle.dll” without affecting other installations? Thank you.
You should have targets with the name of the app you want to rebuild : otbapp_Despeckle for example, on Linux we can do :
make otbapp_Despeckle. If you use ninja (which uses vs 2019 to build) on windows you should be able to do the same. If you use it inside visual studio, you should see the list of targets you can build instead of ALL targets.
Have you used the cookbook to build from source? If you have written an how to, we could integrate it to the cookbook as the current one is quite old.
Let us know,
Thank you for your jelp.
I didn’t follow the current cookbook becasue it is really too old to follow, as you said. All my process of building from source code on Win10 is here: Error when building OTB with MS Visual Studio 2019 - #3 by zlyjob
For the otbDespeckle.cxx, I tried “cmake otbapp_Despeckle” in C:\otbs, but get error
CMake Error: The source directory “C:/otb8/build_Releasex64/Despeckle” does not exist.
Looks like a specific CMakeLists was needed.
Have you tried
ninja otbapp_Despekle ? it is normal that with cmake you can’t call the target. CMake is used to generate the target list and associated makefiles.
I tried and got: ninja: error: unknown target ‘otbapp_Despekle’
Now, I didn’t re-run cmake, but just ran “ninja” as usual, it detected changes and rebuilt otbapp_Despeckle.dll, without touching others. Pretty fast, so I think it’s good.