Avoid UDX linkage symbol collisions

As you develop your UDXs, carefully consider the name choices for the symbols within your UDXs. If you use the same symbol names in different UDXs, a query that uses one of the UDXs runs without any problems; however, if a query uses two or more UDXs that happen to share a common symbol name, the query can return linker errors for symbols with multiple definitions. Common symbol names can result from an accidental reuse of the same symbol name for different purposes, or you might have common code that does the same type of operation in different UDXs.
  • To avoid the linker errors for identically named (but different) symbols, declare functions as static, and use namespaces to help uniquely identify the symbols.
  • To avoid the linker errors for code that is reused among several UDXs, you can compile the code for the UDXs and the shared code into one object file by using the nzudxcompile command. You can also move the shared code into a user-defined shared library and then have the UDXs all depend on that library.