Using omni::kit::IViewport from a C++ extension


I am trying to get access to the default viewport window in a C++ Omniverse extension so I can move the viewport camera based on external input. I am choosing to do this in C++ as the library I am using to access the data to move the camera is C based.

I have tried using the omni::kit::getDefaultViewportWindow() function from <omni/kit/ViewportWindowUtils.h> but I always get returned a nullptr. I tried adding CARB_PLUGIN_IMPL_DEPS(omni::kit::IViewport) at the beginning of the plugin, but I get the error log [Plugin: omni.example.cpp.hello_world.plugin] Dependency: [omni::kit::IViewport v1.0] failed to be resolved..

Is it possible to get the default viewport window in C++ or must it be done within Python? If it is possible from C++, should I be doing this in an alterative way?

I am using Kit version and editing the hello_world example from GitHub - NVIDIA-Omniverse/kit-extension-template-cpp: Omniverse Kit C++ Extension Template (testing with the app from visual studio).