<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Duplicate symbol errors (createDspObject&#x2F;getModuleList&#x2F;destroyDspObject) compiling DspNetwork as Dynamic Library on macOS]]></title><description><![CDATA[<p dir="auto">Environment: macOS, HISE develop branch (up to date with origin/develop), Xcode, compiling a DSP Network as Dynamic Library via <a href="http://batchCompileOSX.sh" rel="nofollow ugc">batchCompileOSX.sh</a>.</p>
<p dir="auto">Error:<br />
duplicate symbol '_createDspObject' in:<br />
duplicate symbol '_getModuleList' in:<br />
duplicate symbol '_destroyDspObject' in:<br />
ld: 20 duplicate symbols</p>
<p dir="auto">Diagnosis:<br />
Using <code>nm</code> on the compiled .o files, I confirmed these symbols are defined in THREE separate object files instead of one:</p>
<ul>
<li>Main.o</li>
<li>include_hi_tools_01.o</li>
<li>include_hi_tools_03.o</li>
</ul>
<p dir="auto">The function bodies live in HiseLibraryHeader.h, guarded by:<br />
#if HI_EXPORT_DSP_LIBRARY<br />
...<br />
#endif</p>
<p dir="auto">HI_EXPORT_DSP_LIBRARY is set to 1 in AppConfig.h (autogenerated from the .jucer's ), which is correct/intentional for exporting the DLL.</p>
<p dir="auto">The problem: hi_tools_01.cpp and hi_tools_03.cpp both #include "../hi_dsp_library/hi_dsp_library.h" (confirmed via grep), which pulls in HiseLibraryHeader.h and re-generates the factory functions in those translation units as well — in addition to Main.cpp, which is the intended single exporter.</p>
<p dir="auto">This seems like it shouldn't happen — hi_tools shouldn't normally depend on hi_dsp_library at all (dependency direction is usually reversed). Is this expected, or is this a bug in how the hi_tools amalgamation includes hi_dsp_library.h? Toggling IS_STATIC_DSP_LIBRARY in Projucer did not change the outcome.</p>
<p dir="auto">Happy to share the exact grep/nm commands and full build log if helpful.</p>
]]></description><link>https://forum.hise.audio/topic/14946/duplicate-symbol-errors-createdspobject-getmodulelist-destroydspobject-compiling-dspnetwork-as-dynamic-library-on-macos</link><generator>RSS for Node</generator><lastBuildDate>Thu, 23 Jul 2026 06:55:53 GMT</lastBuildDate><atom:link href="https://forum.hise.audio/topic/14946.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 23 Jul 2026 02:28:17 GMT</pubDate><ttl>60</ttl></channel></rss>