Re: Compile on Windows

Antti Luoma <[email protected]> Fri, 3 Apr 2020 14:50:52 +0300
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <CAPCTfgOoLA_K43D7eZ19SBnk7o2m3bVVyMnbGYHo=Q7x7a5erQ@mail.gmail.com>
Hi,

I am using vcpkg to compile graphicsmagick and other packages. Works great
on windows and others probably as well.

-antti

ti 31. maalisk. 2020 klo 23.26 Bob Friesenhahn ([email protected])
kirjoitti:

> On Tue, 31 Mar 2020, Pro Turm wrote:
>
> > How do you compile on windows?
> > Following more or less this
> http://www.graphicsmagick.org/INSTALL-windows.html#installing-from-source-code
> http://www.graphicsmagick.org/INSTALL-windows.html#installing-from-source-code
> ,
> > I tried to integrate the GM project into mine.
> >
> > Unfortunately, Im getting many error messages like
> > ...
> > cdjpeg.c(150): error C2491: 'read_stdin': definition of dllimport
> function not allowed
> > ...
> > jccoefct.c(411): error C2491: 'jinit_c_coef_controller': definition of
> dllimport function not allowed
> > etc.
> >
> > So, probably Im missing something in the configuration ?
>
> I suggest looking at a generated project file for a component which is
> similar to yours, such as for the 'gm' utility, and see what settings
> it uses.
>
> Similar the annoying include path, there are some annoying definitions
> produced in the generated project files and the header files react to
> them.  The definitions include these:
>
>   _MT, _LIB, _DLL, _MAGICKMOD_, and _MAGICKLIB_, MSWINDOWS
>
> See magick/common.h in the section protected by
>
> #if defined(MSWINDOWS) && !defined(__CYGWIN__)
>
> for the grody details.
>
> Also, see this comment in magick/studio.h which I added to make sure
> that I have some clue as to how things work:
>
>    When using Autoconf configure script, BuildMagickModules is defined by
>    magick/magick_config.h when modules are to be built.  Building modules
>    requires that support for shared libraries be enabled.
>
>    When using Visual Studio and when using the Autoconf configure script
> with
>    MinGW these options are supplied when compiling the associated
> components:
>
>      libMagick:           _DLL _MAGICKMOD_ _MAGICKLIB_
>      module:              _DLL
>      executable/Magick++: _DLL _MAGICKMOD_
>
>    The Visual Studio build only knows how to build a static build, or a DLL
>    modules-based build.  The Autotools-based build knows how to build
> static,
>    shared, and modules builds.
>
>    Libtool's libltdl is required to build modules when the Autoconf
> configure
>    script is used.
>
> Bob
> --
> Bob Friesenhahn
> [email protected], http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
> Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt
>
>
> _______________________________________________
> Graphicsmagick-help mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
>

_______________________________________________
Graphicsmagick-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help