Writing an extension with third party dependencies

Following the instructions in this tutorial [1], I created my own extension based on this example omni.example.cpp.omnigraph_node [2]. If I follow the basic instructions here [3] I’m able to run the extension and even watch the Omnigraph node in the visual graph editor.

The issue that I’m having is when I try to include my third party dependencies.

  • I tried to debug this with export LD_DEBUG=libs but I can see that my dynamic are loaded properly
  • I also added to my LD_LIBRARY_PATH the path where my third parties dynamic libraries are.

But I’m getting this error:

./kit/kit: symbol lookup error: /home/ahcorde/serve_robotics/ws/skel/wild_west/ahcorde/simulation/kit-extension-template-cpp/_build/linux-x86_64/release/exts/serverobotics.synapse.cpp.omnigraph_nodes/bin/libserverobotics.synapse.cpp.omnigraph_nodes.plugin.so: undefined symbol: _ZN9postmates1x7synapse9transport4NodeC1ERKSs

My premake5.lua file looks like this

    add_files("nodes", "plugins/nodes")
    includedirs {
        <path to includes>
    }
    libdirs {
        <path to dynamic libraries>

    }
    links {
       <dynamic libraries used>
    }

    linkoptions { "-Wl,--disable-new-dtags -Wl,-rpath,%{target_deps}/synapse/release/lib"}

Thank you

[1] Kit C++ Extension Template — Kit Extension Template C++ 106.0 documentation
[2] kit-extension-template-cpp/source/extensions/omni.example.cpp.omnigraph_node at main · NVIDIA-Omniverse/kit-extension-template-cpp · GitHub
[3] omni.example.cpp.omnigraph_node/

the issue is that omniverse is built with the flag_GLIBCXX_USE_CXX11_ABI=0
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html

and you will need to rebuild the third party dependencies with the same to be able to link to it. the definition of std::basic_string is different so the symbol

postmates::x::synapse::transport::Node::Node(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) cannot be found.