Page 1 of 1

Help needed: Linking error on basic program

Posted: 2011-04-21T00:30:36-07:00
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.

Re: Help needed: Linking error on basic program

Posted: 2011-04-21T05:06:54-07:00
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.

Re: Help needed: Linking error on basic program

Posted: 2011-04-26T04:15:18-07:00
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.