Page 1 of 1

Serious problems with std::string

Posted: 2008-11-11T09:53:05-07:00
by dsharlet
A while back I posted a thread about a crash with trying to open an image using Magick++ and using a different version of visual studio. The problem is that std::string is a template class and changes between versions of visual studio.

I found a workaround to that problem by just loading files into blobs myself, and then passing the blob to image magick.

Now I need to deal with attributes - this has the same issue.

IMO it is a serious error to be using std::string in library interfaces. You can not rely on it being the same class on everyone's dev environment.

Compiling my own version of image magick is a bad idea. If anyone has a different version of image magick or decides to install a new version, I will then be screwed.

Is there any workaround to this problem?