On 09/21/2011 11:16 AM, Alexander Hansen wrote:

> #ifdef HAVE_MAGICK
>    //My stuff to initialize GraphicsMagick
>    const char* fn = args (0).string_value ();
>    InitializeMagick(fn);
> ...
>
> But unfortunately that doesn't suffice.
>
> ./DLD-FUNCTIONS/__magick_read__.cc:361:15: error: no viable conversion
> from
>        'std::string' (aka 'basic_string<char>') to 'const char *'
>    const char* fn = args (0).string_value ();
>                ^    ~~~~~~~~~~~~~~~~~~~~~~~~

Google code search <http://google.com/codesearch> shows that most people 
seem to just do:
InitializeMagick(NULL); or InitializeMagick("");

If you really want to pass it argv[0], looks like string_value() gives 
you a std::string, so you should just be able to do:
const char* fn = args(0).string_value().c_str();

Peter


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to