Building under MinGW, need step by step guide

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
dmtmax

Building under MinGW, need step by step guide

Post by dmtmax »

Hi, can anybody explain me how build ImageMagick for building under mingw. I do something wrong and dont understand what. I try to find answer to this question in the internet but cant. I do following steps:
1. download sources for windows.
2. start msys and go to unpacked sources (c:/imagemagick)
3. start ./configure --disable-shared --without perl. In the end of configuring I see summary page, and there is something strange. For example, --with-jpg=yes, but it value is no. Does it mean that library will be built without jpg? If so, why he can find files for jpg?
4. start make. Where libraries will be found?

Does these steps correct?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Building under MinGW, need step by step guide

Post by magick »

To validate the JPEG delegate library, the ImageMagick configure script must find the JPEG library as well as the JPEG development headers (e.g. jpeg.h). Look at config.log to determine exactly why the configure script failed to validate the JPEG library.
dmtmax

Re: Building under MinGW, need step by step guide

Post by dmtmax »

I took a look at config.log. The configure script cant find headers, though they are stay in subdirectories. Is this problem of script or I need to add additional parameters to configure script?
dmtmax

Re: Building under MinGW, need step by step guide

Post by dmtmax »

Hi.
I compiled library, but when i try to compile simple program, i had very much linker errors. Code is

Code: Select all

#include <iostream>
#include <magick++.h>

using namespace std;
using namespace Magick;

int main()
{
    Image empty_image();
    Image local_file_name("300,300","white");
    return 0;
}
Some errors:
..\..\libs\ImageMagick-6.3.5.6\lib\libMagick++.a(Image.o): In function `ZN6Magick5Image12channelDepthEN9MagickLib11ChannelTypeE':c:/im/Magick++/lib/Image.cpp:497: undefined reference to `GetExceptionInfo'
:c:/im/Magick++/lib/Image.cpp:498: undefined reference to `GetImageChannelDepth'
:c:/im/Magick++/lib/Image.cpp:501: undefined reference to `DestroyExceptionInfo'
..\..\libs\ImageMagick-6.3.5.6\lib\libMagick++.a(Image.o): In function `ZN6Magick5Image15quantumOperatorEN9MagickLib11ChannelTypeENS1_22MagickEvaluateOperatorEt':c:/im/Magick++/lib/Image.cpp:1366: undefined reference to `GetExceptionInfo'
:c:/im/Magick++/lib/Image.cpp:1367: undefined reference to `EvaluateImageChannel'
:c:/im/Magick++/lib/Image.cpp:1369: undefined reference to `DestroyExceptionInfo'
..\..\libs\ImageMagick-6.3.5.6\lib\libMagick++.a(Image.o): In function `ZN6Magick5Image15quantumOperatorEiijjN9MagickLib11ChannelTypeENS1_22MagickEvaluateOperatorEt':c:/im/Magick++/lib/Image.cpp:1380: undefined reference to `GetExceptionInfo'
:c:/im/Magick++/lib/Image.cpp:1381: undefined reference to `EvaluateImageChannel'
:c:/im/Magick++/lib/Image.cpp:1383: undefined reference to `DestroyExceptionInfo'
..\..\libs\ImageMagick-6.3.5.6\lib\libMagick++.a(Image.o): In function `ZNK6Magick5Image11boundingBoxEv':c:/im/Magick++/lib/Image.cpp:2170: undefined reference to `GetExceptionInfo'
:c:/im/Magick++/lib/Image.cpp:2171: undefined reference to `GetImageBoundingBox'
:c:/im/Magick++/lib/Image.cpp:2173: undefined reference to `DestroyExceptionInfo'
..\..\libs\ImageMagick-6.3.5.6\lib\libMagick++.a(Image.o): In function `ZN6Magick5Image14cacheThresholdEj':c:/im/Magick++/lib/Image.cpp:2194: undefined reference to `SetMagickResourceLimit'
..\..\libs\ImageMagick-6.3.5.6\lib\libMagick++.a(Image.o): In function `ZNK6Magick5Image11exifProfileEv':c:/im/Magick++/lib/Image.cpp:2653: undefined reference to `GetImageProfile'
:c:/im/Magick++/lib/Image.cpp:2656: undefined reference to `GetStringInfoLength'
:c:/im/Magick++/lib/Image.cpp:2656: undefined reference to `GetStringInfoDatum'
..\..\libs\ImageMagick-6.3.5.6\lib\libMagick++.a(Image.o): In function `ZNK6Magick5Image8fileSizeEv':c:/im/Magick++/lib/Image.cpp:2679: undefined reference to `GetBlobSize'
I dont understand where the problem is.
P.S. All libs like jpg and png are stay in im directory, but configure dont see them. Its configure bug? or something else?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Building under MinGW, need step by step guide

Post by magick »

Add --enable-delegate-build to your configure script command line if your delegate libraries are in the top-level ImageMagick directory. Check config.log to determine why a particular delegate library was not validated if any errors are returned.
dmtmax

Re: Building under MinGW, need step by step guide

Post by dmtmax »

I add -enable-delegate-build, but configure still can`t use libs from im directory. All libraries test failed. For example, for png test failed on:
checking for png_get_io_ptr in -lpng ...
c:\mingw\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lpng
Does it mean that I need previously build all extern libraries by hand?
If not, is there the way how to do that by im configure?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Building under MinGW, need step by step guide

Post by magick »

As we mentioned, the reason the configure script could not find the PNG library is detailed in the config.log file. Check there, correct the problem, and rerun the configure script until the PNG library is validated.
dmtmax

Re: Building under MinGW, need step by step guide

Post by dmtmax »

I downloaded the needed libraries by myself, build them, and just after doing that configure script can see them. I dont understand why I have no ability to build IM using the given sources, because archive package looks like it contain all needed delegate libs. Because I not experienced *nix user, I`m very tired to fight with all dependencies, so I moved to VS.
Thanks for help, but I think that building must be more easier, as a standard for me of distrubuting library. I can build & begin using library just after reading 1 file.
dannyyy

Re: Building under MinGW, need step by step guide

Post by dannyyy »

Let me open this discussion again.

I am working on the same project as "dmtmax". Including me and him, we have SEVEN programmers, and none of us can build successfully ImageMagick using MinGW.

We don't want to use Microsoft tools, we want to use only free and open source tools. But ImageMagick has much more documentation about building IM using Visual C++, and even has a tool to make workspace and project files.

The documentation is too vague about it. The only information I can find on the ImageMagick website is on the page "Advanced Unix Source Installation" (http://www.imagemagick.org/script/advan ... .php#mingw), a single-line instruction which doesn't work for us.

We tried everything, including MSYS, Cygwin and many other tools. I'm trying to convert the Visual C++ project to a CodeBlocks project, and I had some success, I already build five DLLs.

Please, support us on that. Thanks.
Daniel Stein
OVAT Project Administrator
dannyyy

Re: Building under MinGW, need step by step guide

Post by dannyyy »

I had some success so far. I used the following command inside MSYS:

Code: Select all

$ configure --with-quantum-depth=16 --without-perl --without-x
This step is just for creating the correct "magick-config.h" file.

Then I opened the CodeBlocks workspace and projects I imported from the projects generated by the VisualMagick tool.

When I choose the menu item "Build Workspace", everything compiles fine, but stops with an error when linking "CORE_RL_magick_.dll"

Code: Select all

-------------- Build: Release Win32 in CORE_magick ---------------
Linking dynamic library: ..\bin\CORE_RL_magick_.dll
Creating library file: ..\bin\libCORE_RL_magick_.a
..\Release\CORE_magick\magick\composite.o:composite.c:(.text+0xd86): undefined reference to `GetImageArtifact'
..\Release\CORE_magick\magick\distort.o:distort.c:(.text+0x30d): undefined reference to `GetImageArtifact'
..\Release\CORE_magick\magick\draw.o:draw.c:(.text+0x92e6): undefined reference to `SetImageArtifact'
..\Release\CORE_magick\magick\draw.o:draw.c:(.text+0x9e98): undefined reference to `GetImageArtifact'
..\Release\CORE_magick\magick\draw.o:draw.c:(.text+0xd99b): undefined reference to `GetImageArtifact'
..\Release\CORE_magick\magick\draw.o:draw.c:(.text+0xf058): undefined reference to `SetImageArtifact'
..\Release\CORE_magick\magick\draw.o:draw.c:(.text+0xf725): undefined reference to `SetImageArtifact'
..\Release\CORE_magick\magick\draw.o:draw.c:(.text+0xf7c6): undefined reference to `SetImageArtifact'
..\Release\CORE_magick\magick\draw.o:draw.c:(.text+0xf922): undefined reference to `SetImageArtifact'
..\Release\CORE_magick\magick\draw.o:draw.c:(.text+0xf99c): undefined reference to `SetImageArtifact'
..\Release\CORE_magick\magick\draw.o:draw.c:(.text+0xfc40): undefined reference to `GetImageArtifact'
..\Release\CORE_magick\magick\draw.o:draw.c:(.text+0xfc83): undefined reference to `GetImageArtifact'
..\Release\CORE_magick\magick\draw.o:draw.c:(.text+0xfe90): undefined reference to `GetImageArtifact'
..\Release\CORE_magick\magick\image.o:image.c:(.text+0xa24): undefined reference to `CloneImageArtifacts'
..\Release\CORE_magick\magick\image.o:image.c:(.text+0x10db): undefined reference to `DestroyImageArtifacts'
..\Release\CORE_magick\magick\layer.o:layer.c:(.text+0x3a2): undefined reference to `CloneImageArtifacts'
..\Release\CORE_magick\magick\layer.o:layer.c:(.text+0x611): undefined reference to `CloneImageArtifacts'
..\Release\CORE_magick\magick\nt-base.o:nt-base.c:(.text+0xea5): undefined reference to `lt_dlgetsearchpath'
..\Release\CORE_magick\magick\nt-feature.o:nt-feature.c:(.text+0x378): undefined reference to `CreateBitmapIndirect@4'
..\Release\CORE_magick\magick\nt-feature.o:nt-feature.c:(.text+0xf19): undefined reference to `CreateBitmapIndirect@4'
..\Release\CORE_magick\magick\option.o:option.c:(.text+0x1072): undefined reference to `SetImageArtifact'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 16 seconds)
21 errors, 0 warnings
Any clue about what's causing this ?

I'm sorry for asking something so "unconventional", but my project requires it.

Thanks in advance.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Building under MinGW, need step by step guide

Post by magick »

Looks like you are missing the artifact.c source module. Add it to your project.

lt_dlgetsearchpath() is part of the library loader in ltdl/ltdl.c. If HasLTDL is not defined it calls lt_slsearchpath() instead.
dannyyy

Re: Building under MinGW, need step by step guide

Post by dannyyy »

Perfect ! Thank you !

The file "artifact.c" was really missing in the project, I deleted it accidentally.

But I still don't know how to solve the second problem. I configured "#define HasLTDL 1" on the file "magick-config.h" and I have the folder "ltdl" with the files ltdl.c and ltdl.h inside it. What else do I have to do ?

The new messages are:

Code: Select all

-------------- Build: Release Win32 in CORE_magick ---------------
Linking dynamic library: ..\bin\CORE_RL_magick_.dll
Creating library file: ..\bin\libCORE_RL_magick_.a
..\Release\CORE_magick\magick\nt-base.o:nt-base.c:(.text+0xea5): undefined reference to `lt_dlgetsearchpath'
..\Release\CORE_magick\magick\nt-feature.o:nt-feature.c:(.text+0x378): undefined reference to `CreateBitmapIndirect@4'
..\Release\CORE_magick\magick\nt-feature.o:nt-feature.c:(.text+0xf19): undefined reference to `CreateBitmapIndirect@4'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 5 seconds)
3 errors, 0 warnings
dannyyy

Re: Building under MinGW, need step by step guide

Post by dannyyy »

Finally the problem above is solved. I just add the GDI32 library and CORE_magick compiled correctly.

Now I have a new problem:

Code: Select all

-------------- Build: Release Win32 in CORE_Magick++ ---------------
Linking dynamic library: ..\bin\CORE_RL_Magick++_.dll
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0xbaa): undefined reference to `DrawArc'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0xc7e): undefined reference to `DrawPopClipPath'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0xd5c): undefined reference to `DrawCircle'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0xe45): undefined reference to `DrawColor'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x2274): undefined reference to `NewMagickWandFromImage'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x22a5): undefined reference to `DrawComposite'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x241a): undefined reference to `DrawEllipse'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x295c): undefined reference to `NewPixelWand'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x296d): undefined reference to `PixelSetQuantumColor'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x297c): undefined reference to `DrawSetFillColor'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x2984): undefined reference to `DestroyPixelWand'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x2b87): undefined reference to `DrawSetFillOpacity'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x2d1c): undefined reference to `DrawLine'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x2e05): undefined reference to `DrawMatte'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x2ede): undefined reference to `DrawPoint'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x2fa7): undefined reference to `DrawSetFontSize'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x328c): undefined reference to `DrawRectangle'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x3367): undefined reference to `DrawRotate'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x344a): undefined reference to `DrawRoundRectangle'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x352e): undefined reference to `DrawScale'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x35f7): undefined reference to `DrawSkewX'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x36b7): undefined reference to `DrawSkewY'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x37ce): undefined reference to `DrawSetStrokeDashArray'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x3eb7): undefined reference to `DrawSetStrokeDashOffset'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x46dc): undefined reference to `NewPixelWand'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x46ed): undefined reference to `PixelSetQuantumColor'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x46fc): undefined reference to `DrawSetStrokeColor'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x4704): undefined reference to `DestroyPixelWand'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x4847): undefined reference to `DrawSetStrokeOpacity'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x4907): undefined reference to `DrawSetStrokeWidth'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x50ac): undefined reference to `NewPixelWand'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x50bd): undefined reference to `PixelSetQuantumColor'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x50cc): undefined reference to `DrawSetTextUnderColor'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x50d4): undefined reference to `DestroyPixelWand'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x521e): undefined reference to `DrawTranslate'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x52fc): undefined reference to `DrawSetViewbox'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5aa7): undefined reference to `DrawPathLineToHorizontalAbsolute'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5b67): undefined reference to `DrawPathLineToHorizontalRelative'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5c27): undefined reference to `DrawPathLineToVerticalAbsolute'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5ce7): undefined reference to `DrawPathLineToVerticalRelative'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5d3d): undefined reference to `DrawSetTextEncoding'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5d5a): undefined reference to `DrawAnnotation'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5da3): undefined reference to `DrawPushPattern'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5de6): undefined reference to `DrawPushDefs'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5e48): undefined reference to `DrawSetFontFamily'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5e57): undefined reference to `DrawSetFontStyle'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5e66): undefined reference to `DrawSetFontWeight'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5e89): undefined reference to `DrawSetFont'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5ec7): undefined reference to `DrawPathMoveToRelative'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5f17): undefined reference to `DrawPathMoveToAbsolute'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5f67): undefined reference to `DrawPathLineToRelative'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5fb7): undefined reference to `DrawPathLineToAbsolute'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x6007): undefined reference to `DrawPathCurveToQuadraticBezierSmoothRelative'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x6057): undefined reference to `DrawPathCurveToQuadraticBezierSmoothAbsolute'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x60e3): undefined reference to `DrawPathCurveToSmoothRelative'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x6163): undefined reference to `DrawPathCurveToSmoothAbsolute'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x6186): undefined reference to `DrawPathStart'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x61bf): undefined reference to `DrawPathFinish'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x622e): undefined reference to `DrawPathEllipticArcRelative'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x62ae): undefined reference to `DrawPathEllipticArcAbsolute'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x6325): undefined reference to `DrawPathCurveToRelative'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x6395): undefined reference to `DrawPathCurveToAbsolute'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x63f7): undefined reference to `DrawPathCurveToQuadraticBezierRelative'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x6457): undefined reference to `DrawPathCurveToQuadraticBezierAbsolute'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x8fce): undefined reference to `DrawPolyline'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x905e): undefined reference to `DrawPolygon'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x90ee): undefined reference to `DrCreating library file: ..\bin\libCORE_RL_Magick++_.a
awBezier'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0xa84): undefined reference to `DrawAffine'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0xc89): undefined reference to `DrawPopDefs'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x22b9): undefined reference to `DestroyMagickWand'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x2ac4): undefined reference to `DrawSetFillRule'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x2c44): undefined reference to `DrawSetGravity'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x305b): undefined reference to `PopDrawingWand'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x310b): undefined reference to `PushDrawingWand'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x31bb): undefined reference to `DrawPopPattern'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x3f74): undefined reference to `DrawSetStrokeLineCap'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x4034): undefined reference to `DrawSetStrokeLineJoin'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x40f4): undefined reference to `DrawSetStrokeMiterLimit'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x41bb): undefined reference to `DrawSetStrokeAntialias'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x4a4b): undefined reference to `DrawSetTextAntialias'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x4b84): undefined reference to `DrawSetTextDecoration'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x560b): undefined reference to `DrawPathClose'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5dc4): undefined reference to `DrawSetClipPath'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5dfd): undefined reference to `DrawPushClipPath'
..\Release\CORE_Magick++\Magick++\lib\Drawable.o:Drawable.cpp:(.text+0x5e7d): undefined reference to `DrawSetFontStretch'
..\Release\CORE_Magick++\Magick++\lib\Image.o:Image.cpp:(.text+0x4ad1): undefined reference to `DrawAllocateWand'
..\Release\CORE_Magick++\Magick++\lib\Image.o:Image.cpp:(.text+0x4afd): undefined reference to `DestroyDrawingWand'
..\Release\CORE_Magick++\Magick++\lib\Image.o:Image.cpp:(.text+0x4b19): undefined reference to `DrawRender'
..\Release\CORE_Magick++\Magick++\lib\Image.o:Image.cpp:(.text+0x826b): undefined reference to `DrawAllocateWand'
..\Release\CORE_Magick++\Magick++\lib\Image.o:Image.cpp:(.text+0x82c3): undefined reference to `DestroyDrawingWand'
..\Release\CORE_Magick++\Magick++\lib\Image.o:Image.cpp:(.text+0x82db): undefined reference to `DrawRender'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 54 seconds)
91 errors, 0 warnings
This time the problem seems to be much worse, judging by the number of errors. The files responsible for these errors are Drawable.cpp and Image.cpp, but I can't find what's wrong. Do I have to add some library to the project ?
dannyyy

Re: Building under MinGW, need step by step guide

Post by dannyyy »

Ok, this problem is solved, too. I changed the build order in the workspace, to compile CORE_wand first and then CORE_Magick++.

Now there is a new problem. I need to configure the WMF library to generate the wmfconfig.h file, but the WMF configure script aways return the same message:

Code: Select all

...
...
checking for freetype-config... no
checking for FT_Init_FreeType in -lfreetype... no
configure: error: * * * freetype(2) is required * * *
This happens even when the ttf library is present.

What can I do to make the WMF configure script find the FreeType library ?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Building under MinGW, need step by step guide

Post by magick »

Check config.log. It will tell you why the configure script failed to validate the Freetype library. Fix the problem and rerun the configure script until Freetype is validated (see the last 50 lines of the configure script output to determine if Freetype is validated or not).
Post Reply