[CMake] Need a example to use dll in vs

Chaos Zhang zcsd2012 at gmail.com
Mon Apr 25 21:07:28 EDT 2016



Jakob van Bethlehem wrote
> Hej,
> 
> 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.
> 
> 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).
> 
> But back to my original comment: provide more details on what you are
> trying to do, and what is failing.
> 
> Sincerely,
> Jakob van Bethlehem
> 
> On Mon, Apr 25, 2016 at 5:13 AM, Chaos Zhang <

> zcsd2012@

> > wrote:
> 
>> Hi all,
>>
>> I faced a problem when i migrate a project from Linux to windows for the
>> visual stdio seem can not use dll directly. I look through a number of
>> material  and known i seem should use IMPORTED in add_library(...), but i
>> can not find a practical example about how to use it. Could you please
>> give
>> me one or some? BTW the dll lib seem could be used in Mingw makefile on
>> windows.
>>
>> Thanks,
>> Chao Zhang
>>
>>
>>
>> --
>> View this message in context:
>> http://cmake.3232098.n2.nabble.com/Need-a-example-to-use-dll-in-vs-tp7593331.html
>> Sent from the CMake mailing list archive at Nabble.com.
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake
>>
> 
> -- 
> 
> Powered by www.kitware.com
> Thanks for your advice, i have add a new topic named "How to link shared
> lib on windows (visual studio 2014)", sincerely look forward to your
> reply. ^_^ 
> 
> Chao
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake





--
View this message in context: http://cmake.3232098.n2.nabble.com/Need-a-example-to-use-dll-in-vs-tp7593331p7593347.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list