<div dir="ltr"><div>Hej,</div><div><br></div>You really should provide more detailed information about your project structure, and what is going wrong. There are some subtle differences between Linux/Windows, but not at the level you're referring to. Certainly the IMPORTED property has nothing to do with a platform distinction. IMPORTED libraries work exactly the same on Windows/Linux. <div><br></div><div>There is a very big difference between Linux/Windows though in the sense that on Windows you need to explicitly export symbols you want to be available on the interface of the dll. My first guess from your very limited info is that something is wrong in that area (and if that's the case, you can easily resolve this using the GenerateExportHeader module). </div><div><br></div><div>But back to my original comment: provide more details on what you are trying to do, and what is failing.</div><div><br></div><div>Sincerely,</div><div>Jakob van Bethlehem</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 25, 2016 at 5:13 AM, Chaos Zhang <span dir="ltr"><<a href="mailto:zcsd2012@gmail.com" target="_blank">zcsd2012@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I faced a problem when i migrate a project from Linux to windows for the<br>
visual stdio seem can not use dll directly. I look through a number of<br>
material  and known i seem should use IMPORTED in add_library(...), but i<br>
can not find a practical example about how to use it. Could you please give<br>
me one or some? BTW the dll lib seem could be used in Mingw makefile on<br>
windows.<br>
<br>
Thanks,<br>
Chao Zhang<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://cmake.3232098.n2.nabble.com/Need-a-example-to-use-dll-in-vs-tp7593331.html" rel="noreferrer" target="_blank">http://cmake.3232098.n2.nabble.com/Need-a-example-to-use-dll-in-vs-tp7593331.html</a><br>
Sent from the CMake mailing list archive at Nabble.com.<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>