[vtkusers] mingw library naming - bug 10969

André Prins a.h.prins at gmail.com
Fri Jul 30 15:02:06 EDT 2010


Hi All,

Allow me to chime in a little on the use of Vtk libs with MinGW. I
also reported a python-wrapping and installation issue a few days ago
as a response to the mail from Jim.

> What is the primary user of a mingw compiler system trying to achieve?
>
> Somebody trying to build unix-y stuff for Windows?
> Or somebody trying to build unix-y stuff to still be unix-y in an MSYS shell
> environment?

The most important reason for me is that I can test my source-code for
compatibility with the Gcc compiler, without having to setup a Linux
machine or a full cygwin environment. Second, I used gcc a lot (in
Unix/Linux), but am stuck with a windows-environment nowadays. It is
simply faster for me to set up a small test-application with a
makefile (or CMakeLists.txt) then to open up a new visual studio
project. Starting visual studio is slow on an Asus EEE Netbook.

Personally, I would say: get rid of the lib-prefix in MinGW...
    1) It implies a consistent dll and pyd name on windows, which is good.
    2) It probably solves the install errors with MinGW and python-wrapping.

This is something which can be done with CMake and is what I do when I
want my own vtk-library wrapped with python. E.g., I have a "Readers"
library, which does the following in CMake:

    add_library( ReadersPython SHARED ${ReadersPython_SRCS} )
    # Ensure the lib-prefix is gone and the library ends with .pyd
    set_target_properties( ReadersPython PROPERTIES PREFIX "" )
    set_target_properties( ReadersPython PROPERTIES SUFFIX ".pyd" )

I have not encountered any problems with this approach. I guess this
is similar to setting a "system-wide" CMAKE_SHARED_LIBRARY_PREFIX?

Regards,
Andre



More information about the vtkusers mailing list