Help needed: Linking error on basic program

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
Duke95
Posts: 1
Joined: 2011-04-20T08:08:49-07:00
Authentication code: 8675308

Help needed: Linking error on basic program

Post by Duke95 »

Hello,

This is the program I am trying to run just to test if my installation of magick++ worked.

Code: Select all

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

using namespace std;
using namespace Magick;

void main()
{
	Image master;

	master.read("test.jpg");

	master.display();

	master.write("Success.jpg");
}

The compiling works fine but the linking stage crashes. I get 29 errors of this kind:

"
1>CORE_DB_libxml_.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function _xmlNanoHTTPInit
1>CORE_DB_libxml_.lib(nanoftp.obj) : error LNK2001: unresolved external symbol __imp__WSAStartup@8
"

I have followed the installation instructions step by step as they are given here:
http://www.imagemagick.org/script/install-source.php

But still, it seems I am missing a library which I am sure I've included in the project's "additionnal dependencies". If anyone has a idea, I would be glad to hear it.

Just so you know, I am working under Windows XP64bits with Visual Studio 2005.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Help needed: Linking error on basic program

Post by magick »

Choose the Release version of the build. If that fails go to c:\Program Files\ImageMagick-6.6.9-Q16\Magick++_demos and choose the button workspace. Select the Release version and build and execute. Now use the button workspace as a template for your own project.
Ashok
Posts: 1
Joined: 2011-04-26T01:26:46-07:00
Authentication code: 8675308

Re: Help needed: Linking error on basic program

Post by Ashok »

Hi i am using visual studio 2005. When i am reading image using "image.read" i am getting access violation reading location error.
I am using ImageMagick-6.6.9-6-Q16-windows-dll.exe. I included all the libraries.
Note:
System config: Windows XP ( 32 bit) Service Pack 2.

Plz help me to solve this issue.

Regards,
Ashok.
Post Reply