# Windows linker issue on develop

**URL:** <https://forum.juce.com/t/windows-linker-issue-on-develop/55524>\
**Category:** General JUCE discussion\
**Created:** [March 26, 2023, 4:19pm UTC](https://forum.juce.com/t/windows-linker-issue-on-develop/55524 "2023-03-26T16:19:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [March 27, 2023, 1:58pm UTC](https://forum.juce.com/t/windows-linker-issue-on-develop/55524/2 "2023-03-27T13:58:59Z")

</div>

Thanks, I see what’s going wrong. We’re currently trying to determine the cleanest solution, but should have something out shortly.

Tangentially-related: when I build your project locally with ClangCL, I get quite a lot of duplicate symbol warnings (ODR violations) when linking the test target. I think the problem is that the `JUCE_DEPENDENCIES` are linked separately to the plugin target and the test target. JUCE modules are interface targets, which means that they are built separately for each non-interface target that links against them. In turn, this means that the test binary contains two copied of the JUCE modules; one from the plugin shared-code target, and one linked directly to the test target.

To avoid the ODR violations, you could consider _only_ linking JUCE\_DEPENDENCIES to the shared-code target, then re-exporting the shared-code target’s preprocessor definitions and include directories. That way, when you add the shared-code target as a dependency of the test target, the test target will still inherit all of the JUCE flags and include directories.

```auto
target_compile_definitions(${PROJECT_NAME} INTERFACE $<TARGET_PROPERTY:${PROJECT_NAME},COMPILE_DEFINITIONS>)
target_include_directories(${PROJECT_NAME} INTERFACE $<TARGET_PROPERTY:${PROJECT_NAME},INCLUDE_DIRECTORIES>)

```

---

_[View the full topic](https://forum.juce.com/t/windows-linker-issue-on-develop/55524)._
