4 Replies - 840 Views - Last Post: 14 August 2013 - 12:28 PM Rate Topic: -----

#1 Nano511  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 145
  • Joined: 07-October 12

How to set up ImageMagick in visual studio 2010?

Posted 14 August 2013 - 09:34 AM

Im trying to follow this tutorial series, and it says to install ImageMagick. I went to the website downloaded it, but i cant get it to work.

I linked the include folder and the lib folder, i added "CORE_RL_magick_.lib", "CORE_RL_Magick++_.lib", "CORE_RL_wand_.lib", and "X11.lib" to Additional Dependcies under Linker>Input. When i build my project i get a bunch or errors that seem to indicate problems with the ImageMagick code itself. Here is an example of 2 of them:
1>c:\program files (x86)\imagemagick-6.8.6-q16\include\magick\pixel-accessor.h(160): warning C4244: '=' : conversion from 'double' to 'MagickCore::MagickRealType', possible loss of data
1>c:\program files (x86)\imagemagick-6.8.6-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>          ]




I think the problem might have to do with building something? Im not really sure how it works exactly. I've built something before with cmake, but i used a tutorial. Has anyone worked with ImageMagick before?

Is This A Good Question/Topic? 0
  • +

Replies To: How to set up ImageMagick in visual studio 2010?

#2 frostraver  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 93
  • Joined: 11-September 12

Re: How to set up ImageMagick in visual studio 2010?

Posted 14 August 2013 - 10:23 AM

I can tell you that the first error is something you don't really need to worry about. I guess that you know what you need to do? (I'll just tell you if you don't). You should use a static_cast on the variable where this warning is called from.

Second... Your real problem. I don't know if you have taken a look at this: Link Here!?
One other thing is, you can't use STL in a DLL. I read somewhere that STL is a code library and can't work with a binary library like a DLL.

I don't know if this can help you though. Just keep asking if you have any more questions :)
Was This Post Helpful? 0
  • +
  • -

#3 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 0
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: How to set up ImageMagick in visual studio 2010?

Posted 14 August 2013 - 12:09 PM

View Postfrostraver, on 14 August 2013 - 02:23 PM, said:

One other thing is, you can't use STL in a DLL. I read somewhere that STL is a code library and can't work with a binary library like a DLL.

Not true at all. You certainly can, just that generally (apart from STL vector), you cannot export them from a dll.
Was This Post Helpful? 0
  • +
  • -

#4 frostraver  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 93
  • Joined: 11-September 12

Re: How to set up ImageMagick in visual studio 2010?

Posted 14 August 2013 - 12:14 PM

Well, I guess I've misunderstood? Here's the link: Link
Or the information is wrong of course

This post has been edited by frostraver: 14 August 2013 - 12:14 PM

Was This Post Helpful? 0
  • +
  • -

#5 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 0
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: How to set up ImageMagick in visual studio 2010?

Posted 14 August 2013 - 12:28 PM

Did you read the very first paragraph of the first answer?

Quote

Keep in mind one thing before you read further: My answer is coming from the point of view of writing portable code that can be used in applications made up of modules compiled under different compilers. This can include different versions or even different patch levels of the same compiler.

Which says that it is an issue that will be flagged on some environments but not others (with/without the correct build setting flags set). Generally it is not advised if you wish to maintain portable code.

Secondly, warnings are being given - not errors.

This post has been edited by ButchDean: 14 August 2013 - 12:28 PM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1