I'vejustinstalled GraphicsMagick-1.3.7 underMinGW on Windows Vista OS.
I'mtrying to compileanexemplary piece ofcodeincludedinthedocumentationusingthe C++ API (Magick++).<o:p></o:p>
<o:p> </o:p>
#include <string><o:p></o:p>
#include <iostream><o:p></o:p>
#include <Magick++.h><o:p></o:p>
<o:p> </o:p>
usingnamespacestd;<o:p></o:p>
usingnamespaceMagick;<o:p></o:p>
<o:p> </o:p>
intmain(int /*argc*/,char **/*argv*/)<o:p></o:p>
{<o:p></o:p>
try
{<o:p></o:p>
// Createbase image (white image of 300 by 200 pixels)<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:12:
undefinedreference to
`Magick::Color::Color(char const*)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:12:
undefinedreference to
`Magick::Geometry::Geometry(unsignedint, unsignedint, unsignedint,
unsignedint, bool, bool)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:12:
undefinedreference to
`Magick::Image::Image(Magick::Geometryconst&, Magick::Colorconst&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:12:
undefinedreference to
`Magick::Geometry::~Geometry()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:12:
undefinedreference to
`Magick::Geometry::~Geometry()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:12:
undefinedreference to
`Magick::Color::~Color()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:12:
undefinedreference to
`Magick::Color::~Color()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:15:
undefinedreference to
`Magick::Color::Color(char const*)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:15:
undefinedreference to
`Magick::Image::strokeColor(Magick::Colorconst&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:15:
undefinedreference to
`Magick::Color::~Color()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:15:
undefinedreference to
`Magick::Color::~Color()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:16:
undefinedreference to
`Magick::Color::Color(char const*)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:16:
undefinedreference to
`Magick::Image::fillColor(Magick::Colorconst&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:16:
undefinedreference to
`Magick::Color::~Color()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:16:
undefinedreference to
`Magick::Color::~Color()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:17:
undefinedreference to
`Magick::Image::strokeWidth(double)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:20:
undefinedreference to
`Magick::Drawable::Drawable(Magick::DrawableBaseconst&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:20:
undefinedreference to
`Magick::Image::draw(Magick::Drawableconst&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:20:
undefinedreference to
`Magick::Drawable::~Drawable()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:20:
undefinedreference to
`Magick::Drawable::~Drawable()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:20:
undefinedreference to
`Magick::DrawableCircle::~DrawableCircle()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:20:
undefinedreference to
`Magick::DrawableCircle::~DrawableCircle()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:23:
undefinedreference to
`Magick::Drawable::Drawable(Magick::DrawableBaseconst&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:23:
undefinedreference to
`Magick::Image::draw(Magick::Drawableconst&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:23:
undefinedreference to
`Magick::Drawable::~Drawable()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:23:
undefinedreference to
`Magick::Drawable::~Drawable()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:23:
undefinedreference to
`Magick::DrawableRectangle::~DrawableRectangle()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:23:
undefinedreference to
`Magick::DrawableRectangle::~DrawableRectangle()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:26:
undefinedreference to
`Magick::Image::display()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:26:
undefinedreference to
`Magick::Image::~Image()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1.
cpp:26:
undefinedreference to
`Magick::Image::~Image()'<o:p></o:p>
GraphicsProj1.o: In function
`ZN6Magick14DrawableCircleC1Edddd':<o:p></o:p>
C:/MinGW/GraphicsMagick-1.3.7/Magick++/lib/Magick++/Drawable.h:(.text$_ZN6Magick17DrawableRectangleC1Edddd+0x1
6): undefinedreference to `vtable for Magick::DrawableRectangle'<o:p></o:p>
C:/MinGW/GraphicsMagick-1.3.7/Magick++/lib/Magick++/Drawable.h:(.text$_ZN6Magick12DrawableBaseC2Ev+0x16):
undefinedreference to `vtable for Magick::DrawableBase'<o:p></o:p>
C:/MinGW/GraphicsMagick-1.3.7/Magick++/lib/Magick++/Drawable.h:(.text$_ZN6Magick14DrawableCircleC1Edddd+0x16):
undefinedreference
to `vtable for Magick::DrawableCircle'<o:p></o:p>
collect2: ldreturned
1 exit status<o:p></o:p>
Builderroroccurred, buildisstopped<o:p></o:p>
Timeconsumed:
2730ms.<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
I'mprobablymissingsomethingverysimplehere
but I'vebeengraduallyaddingpaths/librariesinthe Project PropertiesofEclipsewithoutsuccessandseemsI'mstuckhere...<o:p></o:p>
<o:p> </o:p>
Any help greatlyappreciated!<o:p></o:p>
<o:p> </o:p>
</body>
</html>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Post code and logs in code mark-up to preserve the format.
The subject of this forum is Dev-C++, which while that uses MinGW, and help
may be obtained here, it is not specifically a MinGW forum; there may be more
appropriate places to get help that here.
The problem that you have is that you have not linked the static or export
library that contains the symbols reported as missing (all in GraphicsMagick
by the looks of it). It is not sufficient to add a whole load of search paths
for the library (-L< path > options), you also have to specify the
libraries. I could not tell you what libraries ot link; as I said you are on
the wrong forum for that. I suggest you try
<html xmlns:v="urn:schemas-microsoft-com:vml" <br="">xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 11">
<meta name="Originator" content="Microsoft Word 11">
<link rel="File-List" href="Question_pliki/filelist.xml">
<xml>
<o:DocumentProperties>
<o:Author>aaa</o:Author>
<o:Template>Normal</o:Template>
<o:LastAuthor>aaa</o:LastAuthor>
<o:Revision>2</o:Revision>
<o:TotalTime>1</o:TotalTime>
<o:Created>2009-12-25T18:54:00Z</o:Created>
<o:LastSaved>2009-12-25T18:54:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>971</o:Words>
<o:Characters>5832</o:Characters>
<o:Company>bbb</o:Company>
<o:Lines>48</o:Lines>
<o:Paragraphs>13</o:Paragraphs>
<o:CharactersWithSpaces>6790</o:CharactersWithSpaces>
<o:Version>11.6568</o:Version>
</o:DocumentProperties>
</xml><xml>
<w:WordDocument>
<w:DontDisplayPageBoundaries/>
<w:SpellingState>Clean</w:SpellingState>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml>
<style>
</style>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:Standardowy;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<xml>
<o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml>
</head>
<body lang="PL" style="tab-interval:35.4pt">
Hi,<o:p></o:p>
<o:p> </o:p>
I've just installed GraphicsMagick-1.3.7 under MinGW on Windows Vista OS. I'm trying to compile an exemplary piece of code included in the documentation using the C++ API (Magick++).<o:p></o:p>
<o:p> </o:p>
#include <string><o:p></o:p>
#include <iostream><o:p></o:p>
#include <Magick++.h><o:p></o:p>
<o:p> </o:p>
using namespace std;<o:p></o:p>
using namespace Magick;<o:p></o:p>
<o:p> </o:p>
int main(int /*argc*/,char **/*argv*/)<o:p></o:p>
{<o:p></o:p>
try {<o:p></o:p>
// Create base image (white image of 300 by 200 pixels)<o:p></o:p>
Image image( Geometry(300,200), Color("white") );<o:p></o:p>
<o:p> </o:p>
// Set draw options<o:p></o:p>
image.strokeColor("red"); // Outline color<o:p></o:p>
image.fillColor("green"); // Fill color<o:p></o:p>
image.strokeWidth(5);<o:p></o:p>
<o:p> </o:p>
// Draw a circle<o:p></o:p>
image.draw( DrawableCircle(100,100, 50,100) );<o:p></o:p>
<o:p> </o:p>
// Draw a rectangle<o:p></o:p>
image.draw( DrawableRectangle(200,200, 270,170) );<o:p></o:p>
<o:p> </o:p>
// Display the result<o:p></o:p>
image.display( );<o:p></o:p>
}<o:p></o:p>
catch( exception &error_ )<o:p></o:p>
{<o:p></o:p>
cout << "Caught exception: " << error_.what() << endl;<o:p></o:p>
return 1;<o:p></o:p>
}<o:p></o:p>
<o:p> </o:p>
return 0;<o:p></o:p>
}<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
Those are the errors returned: <o:p></o:p>
<o:p> </o:p>
**** Build of configuration Debug for project GraphicsProj ****<o:p></o:p>
<o:p> </o:p>
**** Internal Builder is used for build ****<o:p></o:p>
g++ -IC:\MinGW\include\lib -IC:\MinGW\GraphicsMagick-1.3.7\magick -IC:\MinGW\GraphicsMagick-1.3.7\Magick++\lib -IC:\MinGW\GraphicsMagick-1.3.7 -O0 -g3 -Wall -c -fmessage-length=0 -oGraphicsProj1.o ..\GraphicsProj1.cpp<o:p></o:p>
g++ -LC:\MinGW\GraphicsMagick-1.3.7\Magick++\lib -LC:\MinGW\GraphicsMagick-1.3.7\magick\.libs -LC:\MinGW\GraphicsMagick-1.3.7\Magick++\lib\.libs -LC:\MinGW\GraphicsMagick-1.3.7\magick\.deps -LC:\MinGW\GraphicsMagick-1.3.7\Magick++\lib\.deps -LC:\MinGW\GraphicsMagick-1.3.7 -LC:\MinGW\GraphicsMagick-1.3.7\utilities -oGraphicsProj.exe GraphicsProj1.o<o:p></o:p>
GraphicsProj1.o: In function `main':<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:12: undefined reference to `Magick::Color::Color(char const*)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:12: undefined reference to `Magick::Geometry::Geometry(unsigned int, unsigned int, unsigned int, unsigned int, bool, bool)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:12: undefined reference to `Magick::Image::Image(Magick::Geometry const&, Magick::Color const&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:12: undefined reference to `Magick::Geometry::~Geometry()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:12: undefined reference to `Magick::Geometry::~Geometry()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:12: undefined reference to `Magick::Color::~Color()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:12: undefined reference to `Magick::Color::~Color()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:15: undefined reference to `Magick::Color::Color(char const*)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:15: undefined reference to `Magick::Image::strokeColor(Magick::Color const&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:15: undefined reference to `Magick::Color::~Color()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:15: undefined reference to `Magick::Color::~Color()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:16: undefined reference to `Magick::Color::Color(char const*)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:16: undefined reference to `Magick::Image::fillColor(Magick::Color const&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:16: undefined reference to `Magick::Color::~Color()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:16: undefined reference to `Magick::Color::~Color()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:17: undefined reference to `Magick::Image::strokeWidth(double)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:20: undefined reference to `Magick::Drawable::Drawable(Magick::DrawableBase const&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:20: undefined reference to `Magick::Image::draw(Magick::Drawable const&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:20: undefined reference to `Magick::Drawable::~Drawable()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:20: undefined reference to `Magick::Drawable::~Drawable()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:20: undefined reference to `Magick::DrawableCircle::~DrawableCircle()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:20: undefined reference to `Magick::DrawableCircle::~DrawableCircle()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:23: undefined reference to `Magick::Drawable::Drawable(Magick::DrawableBase const&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:23: undefined reference to `Magick::Image::draw(Magick::Drawable const&)'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:23: undefined reference to `Magick::Drawable::~Drawable()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:23: undefined reference to `Magick::Drawable::~Drawable()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:23: undefined reference to `Magick::DrawableRectangle::~DrawableRectangle()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:23: undefined reference to `Magick::DrawableRectangle::~DrawableRectangle()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:26: undefined reference to `Magick::Image::display()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:26: undefined reference to `Magick::Image::~Image()'<o:p></o:p>
C:/Users/dru/workspace/GraphicsProj/Debug/../GraphicsProj1. cpp:26: undefined reference to `Magick::Image::~Image()'<o:p></o:p>
GraphicsProj1.o: In function `ZN6Magick14DrawableCircleC1Edddd':<o:p></o:p>
C:/MinGW/GraphicsMagick-1.3.7/Magick++/lib/Magick++/Drawable.h:(.text$_ZN6Magick17DrawableRectangleC1Edddd+0x1 6): undefined reference to `vtable for Magick::DrawableRectangle'<o:p></o:p>
C:/MinGW/GraphicsMagick-1.3.7/Magick++/lib/Magick++/Drawable.h:(.text$_ZN6Magick12DrawableBaseC2Ev+0x16): undefined reference to `vtable for Magick::DrawableBase'<o:p></o:p>
C:/MinGW/GraphicsMagick-1.3.7/Magick++/lib/Magick++/Drawable.h:(.text$_ZN6Magick14DrawableCircleC1Edddd+0x16): undefined reference to `vtable for Magick::DrawableCircle'<o:p></o:p>
collect2: ld returned 1 exit status<o:p></o:p>
Build error occurred, build is stopped<o:p></o:p>
Time consumed: 2730 ms.<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
I'm probably missing something very simple here but I've been gradually adding paths/libraries in the Project Properties of Eclipse without success and seems I'm stuck here...<o:p></o:p>
<o:p> </o:p>
Any help greatly appreciated!<o:p></o:p>
<o:p> </o:p>
</body>
</html>
Post code and logs in code mark-up to preserve the format.
The subject of this forum is Dev-C++, which while that uses MinGW, and help
may be obtained here, it is not specifically a MinGW forum; there may be more
appropriate places to get help that here.
The problem that you have is that you have not linked the static or export
library that contains the symbols reported as missing (all in GraphicsMagick
by the looks of it). It is not sufficient to add a whole load of search paths
for the library (-L< path > options), you also have to specify the
libraries. I could not tell you what libraries ot link; as I said you are on
the wrong forum for that. I suggest you try
: http://www.graphicsmagick.org
Yes. I also placed a question on that forum.
Just to trying to broaden the search for the answers.
Thanks anyway.