Page 1 of 1

Error occured when compiling the demo project code

Posted: 2010-03-29T21:55:55-07:00
by binocthex11
I've installed ImageMagick-6.6.0-Q16 and built successfully the demo project called 'button' with VS2008.
The project is to generate an output image with a labeled button.

Then I tried to establish a new Win32 console project, copied button.cpp source code into the project, changed
the settings of include file path, library file path and so on.

The compile result is:

Code: Select all

1>------ Build started: Project: test, Configuration: Debug Win32 ------
1>Compiling...
1>test.cpp
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(456) : warning C4251: 'Magick::DrawableBezier::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::DrawableBezier'
1>        with
1>        [
1>            _Ty=Magick::Coordinate
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(1128) : warning C4251: 'Magick::DrawablePath::_path' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::DrawablePath'
1>        with
1>        [
1>            _Ty=Magick::VPath
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(1217) : warning C4251: 'Magick::DrawablePolygon::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::DrawablePolygon'
1>        with
1>        [
1>            _Ty=Magick::Coordinate
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(1237) : warning C4251: 'Magick::DrawablePolyline::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::DrawablePolyline'
1>        with
1>        [
1>            _Ty=Magick::Coordinate
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2255) : warning C4251: 'Magick::PathArcAbs::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathArcAbs'
1>        with
1>        [
1>            _Ty=Magick::PathArcArgs
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2277) : warning C4251: 'Magick::PathArcRel::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathArcRel'
1>        with
1>        [
1>            _Ty=Magick::PathArcArgs
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2428) : warning C4251: 'Magick::PathCurvetoAbs::_args' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathCurvetoAbs'
1>        with
1>        [
1>            _Ty=Magick::PathCurvetoArgs
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2451) : warning C4251: 'Magick::PathCurvetoRel::_args' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathCurvetoRel'
1>        with
1>        [
1>            _Ty=Magick::PathCurvetoArgs
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2475) : warning C4251: 'Magick::PathSmoothCurvetoAbs::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathSmoothCurvetoAbs'
1>        with
1>        [
1>            _Ty=Magick::Coordinate
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2500) : warning C4251: 'Magick::PathSmoothCurvetoRel::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathSmoothCurvetoRel'
1>        with
1>        [
1>            _Ty=Magick::Coordinate
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2609) : warning C4251: 'Magick::PathQuadraticCurvetoAbs::_args' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathQuadraticCurvetoAbs'
1>        with
1>        [
1>            _Ty=Magick::PathQuadraticCurvetoArgs
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2633) : warning C4251: 'Magick::PathQuadraticCurvetoRel::_args' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathQuadraticCurvetoRel'
1>        with
1>        [
1>            _Ty=Magick::PathQuadraticCurvetoArgs
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2657) : warning C4251: 'Magick::PathSmoothQuadraticCurvetoAbs::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathSmoothQuadraticCurvetoAbs'
1>        with
1>        [
1>            _Ty=Magick::Coordinate
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2681) : warning C4251: 'Magick::PathSmoothQuadraticCurvetoRel::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathSmoothQuadraticCurvetoRel'
1>        with
1>        [
1>            _Ty=Magick::Coordinate
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2709) : warning C4251: 'Magick::PathLinetoAbs::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathLinetoAbs'
1>        with
1>        [
1>            _Ty=Magick::Coordinate
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2733) : warning C4251: 'Magick::PathLinetoRel::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathLinetoRel'
1>        with
1>        [
1>            _Ty=Magick::Coordinate
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2875) : warning C4251: 'Magick::PathMovetoAbs::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathMovetoAbs'
1>        with
1>        [
1>            _Ty=Magick::Coordinate
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\drawable.h(2899) : warning C4251: 'Magick::PathMovetoRel::_coordinates' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::PathMovetoRel'
1>        with
1>        [
1>            _Ty=Magick::Coordinate
1>        ]
1>c:\program files\imagemagick-6.6.0-q16\include\magick++\stl.h(370) : warning C4251: 'Magick::drawImage::_drawableList' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'Magick::drawImage'
1>        with
1>        [
1>            _Ty=Magick::Drawable
1>        ]
1>c:\users\visual studio 2008\projects\test\test\test.cpp(24) : warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(447) : see declaration of 'getenv'
1>c:\users\visual studio 2008\projects\test\test\test.cpp(25) : warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(447) : see declaration of 'getenv'
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>Embedding manifest...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Build log was saved at "file://c:\Users\Visual Studio 2008\Projects\test\test\Debug\BuildLog.htm"
1>test - 0 error(s), 21 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
And the generated .exe file crashed at startup time.

Could any one give me some help?
Thanks :)