[CMake] Creating DLL from FORTRAN code

Petr Kmoch petr.kmoch at gmail.com
Wed Feb 25 08:07:26 EST 2015


Hi Doron,

it would be helpful if you provided the error you're getting from
add_library(), and also showed the exact CMake code you used.

Petr

On Wed, Feb 25, 2015 at 1:57 PM, Doron Klepach <klepachd at gmail.com> wrote:

> Hello there,
>
> I am new to CMake and I am trying to convert a project to work with CMake.
>
> As a part of the process I need to create a DLL from a FORTRAN code.
>
> Here are some details:
> *The code works on Visual Studio and creates the DLL as required.
>
> *The main subroutine looks like this:
>
> subroutine sub1(var1,var2 ...)
>
> !DEC$ ATTRIBUTES DLLEXPORT      :: sub1
>
> ...
>
> ens subroutine sub1
>
> * I looked at the CMake command
>
> add_library(<name> [STATIC | SHARED | MODULE]
>             [EXCLUDE_FROM_ALL]
>             source1 [source2 ...])
>
> and tried the SHARED option, but that did not work, giving an error.
>
> * I looked at several sources for help, including
> http://www.kitware.com/blog/home/post/231
>
> but I was not able to figure out how to create the DLL (the link to the example is not working)
>
> I would appreciate a simple example that shows how to do this.
>
> Thank you for your help,
>
> Doron
>
>
>
> --
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150225/f494529f/attachment.html>


More information about the CMake mailing list