Logo
  • Manifesto
  • Changelog
  • Coding Style Guide
  • API
    • Directory hierarchy
    • Namespace hierarchy
    • API contents
      • Classes
      • Macros
      • Directories
      • Enumerations
      • Files
      • Functions
      • Groups
      • Namespaces
        • carb
        • carb::assert
        • carb::assets
        • carb::audio
        • carb::container
        • carb::container::detail
        • carb::cpp
        • carb::cpp17
        • carb::cpp20
        • carb::crashreporter
        • carb::crashreporter::detail
        • carb::delegate
        • carb::delegate::detail
        • carb::detail
        • carb::dictionary
        • carb::eventdispatcher
        • carb::events
        • carb::extras
        • carb::filesystem
        • carb::input
        • carb::l10n
        • carb::launcher
        • carb::logging
        • carb::math
        • carb::memory
        • carb::options
        • carb::process
        • carb::profiler
        • carb::settings
        • carb::simplegui
        • carb::stats
        • carb::tasking
        • carb::this_process
        • carb::this_thread
        • carb::thread
        • carb::thread::detail
        • carb::time
        • carb::tokens
        • carb::variant
        • carb::variant_literals
        • carb::windowing
        • detail
        • detail::IsNothrowSwappable
        • detail::IsNothrowSwappableWith
        • detail::IsSwappable
        • detail::IsSwappableWith
        • detail::invocable_r_impl
        • omni
        • omni::audio
        • omni::audio::experimental
        • omni::compiletime
        • omni::core
        • omni::detail
        • omni::experimental
        • omni::experimental::job
        • omni::ext
        • omni::extras
          • omni::extras::ConsentLevel
          • omni::extras::PathEqual
          • omni::extras::PathGreater
          • omni::extras::PathHash
          • omni::extras::PathLess
          • omni::extras::PathMap
          • omni::extras::UnorderedPathMap
          • omni::extras::endsWith
          • omni::extras::fillOutArray
          • omni::extras::getDirectoryItems
          • omni::extras::getDirectoryItemsOfType
          • omni::extras::getDockerCpuLimit
          • omni::extras::getFileSystem
          • omni::extras::getOutArray
          • omni::extras::getSubfolders
          • omni::extras::getSubfolders
          • omni::extras::gitHashFromOmniverseVersion
          • omni::extras::isAnyVersion
          • omni::extras::isPathEqual
          • omni::extras::isRunningInContainer
          • omni::extras::kInt2Delimiters
          • omni::extras::ForceSymbolLink
          • omni::extras::PrivacySettings
          • omni::extras::ScratchBuffer
          • omni::extras::SemanticVersion
          • omni::extras::UniqueApp
          • omni::extras::operator<
          • omni::extras::operator==
          • omni::extras::prereleaseCmp
          • omni::extras::prereleaseCmp
          • omni::extras::readFile
          • omni::extras::replaceAll
          • omni::extras::resolvePath
          • omni::extras::split
          • omni::extras::startsWith
          • omni::extras::stringCompareCaseInsensitive
          • omni::extras::stringToInt2
          • omni::extras::stringToInteger
          • omni::extras::stringToVersion
          • omni::extras::stringToVersionOrDefault
          • omni::extras::toLower
          • omni::extras::versionsCmp
        • omni::kit
        • omni::kit::update
        • omni::log
        • omni::platforminfo
        • omni::python
        • omni::python::detail
        • omni::str
        • omni::structuredlog
        • omni::structuredlog::@248
        • omni::structuredlog::@261
        • rtx
        • std
      • Pages
      • Structs
      • Typedefs
      • Unions
      • Variables
  • License

Top Level

  • Carbonite Plugins/Interfaces
  • Omniverse Native Interfaces
  • Deploying a Carbonite Application

Components

  • Asserts
  • Audio
  • Crash Reporter
  • Function
  • Carbonite Input Plugin
  • Overview
  • Localization
  • Logging
  • Memory
  • Python Bindings
  • String
  • Tasking
  • Telemetry
  • Unicode

Guides

  • ABI Compatibility
  • Building
  • Testing
  • Packaging
  • Releasing
  • Using Valgrind
  • Carbonite Interface Walkthrough
  • Creating a New Omniverse Native Interface
  • Troubleshooting
  • Extending an Omniverse Native Interface Walkthrough
  • Using omni.bind

Documenting

  • Documentation Guidelines
  • Restructured Text Guide
  • C++ Documentation Guide
  • Python Documentation Guide
carbonite
  • »
  • Carbonite SDK API »
  • Classes »
  • omni::extras::ForceSymbolLink
  •  

omni::extras::ForceSymbolLink

Defined in omni/extras/ForceLink.h

class ForceSymbolLink

Helper class to force the linking of a C++ symbol.

This is done by having the symbol’s address be passed to a function in another module. Since, at link time, the linker doesn’t know what the other module’s function will do with the symbol, it can’t discard the symbol. This is useful for ensuring that debug-only or initializer-only symbols do not get unintentionally eliminated from the module they are present in.

Note that since this does not have any data members, it shouldn’t occupy any space in the module’s data section. It will however generate a C++ static initializer and shutdown destructor.

This class should not be used directly, but instead through the OMNI_FORCE_SYMBOL_LINK macro.

Public Functions

inline ForceSymbolLink(void *ptr)

Constructor: passes an argument’s value to a system library.

Parameters

ptr – [in] The address to pass on to a system library call. This prevents the linker from being able to discard the symbol as unused or unreferenced. This value is not accessed as a pointer in any way so any value is acceptable.

Returns

No return value.


© Copyright 2018-2024, NVIDIA. Last updated on Apr 29, 2024.