<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[curl: funktioniert mit windows aber nicht mit linux?]]></title><description><![CDATA[<p>Hi!</p>
<p>Habe folgenden Quelltext:</p>
<pre><code>CURL *socket = curl_easy_init();
    std::string buffer;

    curl_easy_setopt(socket, CURLOPT_URL, wxT(&quot;http://www.google.de&quot;));
    curl_easy_setopt(socket, CURLOPT_WRITEFUNCTION, writer);
    curl_easy_setopt(socket, CURLOPT_WRITEDATA, &amp;buffer);
    curl_easy_perform(socket);
    curl_easy_cleanup(socket);

    wxString ende(buffer.c_str(), wxConvUTF8);
    wxMessageBox(ende);
</code></pre>
<pre><code>static int writer(char *data, size_t size, size_t nmemb,std::string *buffer)
{
  // What we will return
  int result = 0;

  // Is there anything in the buffer?
  if (buffer != NULL)
  {
    // Append the data to the buffer
    buffer-&gt;append(data, size * nmemb);

    // How much did we write?
    result = size * nmemb;
  }

  return result;
}
</code></pre>
<p>In Windows funktioniert alles wunderbar, aber in linux ist die Messagebox hinterher einfach leer.<br />
Ich benutze zusätzlich noch wxWidgets, sollte aber nichts ausmachen.</p>
<p>Gruß,<br />
Speidel</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/253797/curl-funktioniert-mit-windows-aber-nicht-mit-linux</link><generator>RSS for Node</generator><lastBuildDate>Sun, 13 Sep 2026 12:37:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/253797.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 06 Nov 2009 18:12:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to curl: funktioniert mit windows aber nicht mit linux? on Fri, 06 Nov 2009 18:12:38 GMT]]></title><description><![CDATA[<p>Hi!</p>
<p>Habe folgenden Quelltext:</p>
<pre><code>CURL *socket = curl_easy_init();
    std::string buffer;

    curl_easy_setopt(socket, CURLOPT_URL, wxT(&quot;http://www.google.de&quot;));
    curl_easy_setopt(socket, CURLOPT_WRITEFUNCTION, writer);
    curl_easy_setopt(socket, CURLOPT_WRITEDATA, &amp;buffer);
    curl_easy_perform(socket);
    curl_easy_cleanup(socket);

    wxString ende(buffer.c_str(), wxConvUTF8);
    wxMessageBox(ende);
</code></pre>
<pre><code>static int writer(char *data, size_t size, size_t nmemb,std::string *buffer)
{
  // What we will return
  int result = 0;

  // Is there anything in the buffer?
  if (buffer != NULL)
  {
    // Append the data to the buffer
    buffer-&gt;append(data, size * nmemb);

    // How much did we write?
    result = size * nmemb;
  }

  return result;
}
</code></pre>
<p>In Windows funktioniert alles wunderbar, aber in linux ist die Messagebox hinterher einfach leer.<br />
Ich benutze zusätzlich noch wxWidgets, sollte aber nichts ausmachen.</p>
<p>Gruß,<br />
Speidel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1804570</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1804570</guid><dc:creator><![CDATA[Speidel]]></dc:creator><pubDate>Fri, 06 Nov 2009 18:12:38 GMT</pubDate></item></channel></rss>