<div dir="ltr"><div>Thank you very much, Brad. I found that WINDOWS_EXPORT_ALL_SYMBOLS was set in my CMakeLists.txt.</div><div>After I removed it the /DEF parameter from CMAKE_SHARED_LINKER_FLAGS appeared in the linking command.</div><div><br></div><div>--</div><div>Best Regards,</div><div>Alexander<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 8 Nov 2019 at 14:52, Brad King <<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11/8/19 5:17 AM, Alexander wrote:<br>
> /DEF:"E:/workspace/cmake_test_option/tesseract/bin/libtesseract.dir/Release/exports.def"<br>
> is added by CMake automatically and I cannot control it (CMake first creates a file<br>
> objects.txt and then exports.def from it).<br>
<br>
That behavior is not default, but activated by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS:<br>
<br>
  <a href="https://cmake.org/cmake/help/v3.16/variable/CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS.html" rel="noreferrer" target="_blank">https://cmake.org/cmake/help/v3.16/variable/CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS.html</a><br>
<br>
The project you're building must be using that setting.  Find it and turn it off.<br>
<br>
-Brad<br>
</blockquote></div>