Bulding a shared library on Windows

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
jlangworthy
Posts: 3
Joined: Sat Aug 11, 2018 5:52 am

Bulding a shared library on Windows

Post by jlangworthy » Sat Aug 11, 2018 5:56 am

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!

mgates3
Posts: 893
Joined: Fri Jan 06, 2012 2:13 pm

Re: Bulding a shared library on Windows

Post by mgates3 » Mon Aug 13, 2018 11:01 am

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

jlangworthy
Posts: 3
Joined: Sat Aug 11, 2018 5:52 am

Re: Bulding a shared library on Windows

Post by jlangworthy » Mon Aug 13, 2018 12:08 pm

That works, thanks!

dariofigueira
Posts: 16
Joined: Wed Oct 31, 2018 12:06 pm

Re: Bulding a shared library on Windows

Post by dariofigueira » Wed Nov 07, 2018 10:48 am

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

shriniwas852
Posts: 1
Joined: Thu Nov 29, 2018 2:57 am
Location: Mumbai
Contact:

Re: Bulding a shared library on Windows

Post by shriniwas852 » Thu Nov 29, 2018 3:08 am

Hello, everyone!
This is my first post, so hopefully this will help you.

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

dariofigueira
Posts: 16
Joined: Wed Oct 31, 2018 12:06 pm

Re: Bulding a shared library on Windows

Post by dariofigueira » Thu Nov 29, 2018 11:13 am

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,

scdroid13
Posts: 2
Joined: Thu Jun 06, 2019 11:08 pm
Contact:

Re: Bulding a shared library on Windows

Post by scdroid13 » Mon Jun 24, 2019 12:55 pm

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.

Post Reply