Page 1 of 1

Bulding a shared library on Windows

Posted: Sat Aug 11, 2018 5:56 am
by jlangworthy
I have managed to create a visual studio project using cmake, which builds and generates various static libraries. However, I need a DLL so that I can use it with scikit-cuda.

How can I go about producing a DLL instead? I couldn't see any options within CMake.

Thanks!

Re: Bulding a shared library on Windows

Posted: Mon Aug 13, 2018 11:01 am
by mgates3
I don't have experience making DLLs on Windows, but this post from CMake may help.
https://blog.kitware.com/create-dlls-on ... l-feature/

-mark

Re: Bulding a shared library on Windows

Posted: Mon Aug 13, 2018 12:08 pm
by jlangworthy
That works, thanks!

Re: Bulding a shared library on Windows

Posted: Wed Nov 07, 2018 10:48 am
by dariofigueira
Hi jlangworthy,

Would you kindly attach here (or post a link to) the end result CMakeLists.txt you used? Both to compile MAGMA, and then to compile your own code using MAGMA later?

Thank you

Re: Bulding a shared library on Windows

Posted: Thu Nov 29, 2018 3:08 am
by shriniwas852
Hello, everyone!
This is my first post, so hopefully this will help you.

https://cmake.org/cmake/help/v3.4/prop_ ... MBOLS.html

Re: Bulding a shared library on Windows

Posted: Thu Nov 29, 2018 11:13 am
by dariofigueira
Hi shriniwas852, welcome.

Thank you for your effort.

A simple working example CMakeLists.txt based on the one you're using, would be more helpful.

Kind regards,

Re: Bulding a shared library on Windows

Posted: Mon Jun 24, 2019 12:55 pm
by scdroid13
I would may be try to narrow down the issue to system level bindings.
DLL (.dll library) should get initialized by the value of the CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS variable if it is set when a target is created.

This post may help you to set env in Windows: https://hows.tech/set-environment-variables-windows/

In addition, It would be helpful if you can attach your logs, better if I get to see complete dump of traces.