<html>
    <head>
      <base href="http://bugzilla.gdcproject.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Undefined reference to libcurl functions with small program"
   href="http://bugzilla.gdcproject.org/show_bug.cgi?id=202">202</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Undefined reference to libcurl functions with small program
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>GDC
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>development
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>gdc
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>ibuclaw@gdcproject.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sebastien.alaiwan@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following program fails to link:

// cantlink.d
int main() { return 0; }

void f()
{
  import std.conv;
  import std.stdio;

  File input;
  foreach(line; input.byLine())
  {
    to!int(line);
  }
}

$ gdc cantlink.d
/usr/lib/gcc/x86_64-linux-gnu/5/libgphobos2.a(curl.o): In function
`_D3std3net4curl4Curl18_sharedStaticCtor2FZv':
/build/gcc-5-HN3UpE/gcc-5-5.2.1/build/x86_64-linux-gnu/libphobos/src/../../../../src/libphobos/src/std/net/curl.d:3498:
undefined reference to `curl_global_init'
/usr/lib/gcc/x86_64-linux-gnu/5/libgphobos2.a(curl.o): In function
`_D3std3net4curl4Curl8shutdownMFZv':
/build/gcc-5-HN3UpE/gcc-5-5.2.1/build/x86_64-linux-gnu/libphobos/src/../../../../src/libphobos/src/std/net/curl.d:3634:
undefined reference to `curl_easy_cleanup'
/usr/lib/gcc/x86_64-linux-gnu/5/libgphobos2.a(curl.o): In function
`_D3std3net4curl4HTTP4Impl6__dtorMFZv':
/build/gcc-5-HN3UpE/gcc-5-5.2.1/build/x86_64-linux-gnu/libphobos/src/../../../../src/libphobos/src/std/net/curl.d:2049:
undefined reference to `curl_slist_free_all'
/usr/lib/gcc/x86_64-linux-gnu/5/libgphobos2.a(curl.o): In function
`_D3std3net4curl4Curl8shutdownMFZv':
/build/gcc-5-HN3UpE/gcc-5-5.2.1/build/x86_64-linux-gnu/libphobos/src/../../../../src/libphobos/src/std/net/curl.d:3634:
undefined reference to `curl_easy_cleanup'
/usr/lib/gcc/x86_64-linux-gnu/5/libgphobos2.a(curl.o): In function
`_D3std3net4curl3FTP4Impl6__dtorMFZv':
/build/gcc-5-HN3UpE/gcc-5-5.2.1/build/x86_64-linux-gnu/libphobos/src/../../../../src/libphobos/src/std/net/curl.d:2817:
undefined reference to `curl_slist_free_all'
/usr/lib/gcc/x86_64-linux-gnu/5/libgphobos2.a(curl.o): In function
`_D3std3net4curl4Curl8shutdownMFZv':
....


However, the following program links fine:

// linksfine.d
int main() { return 0; }

void f()
{
  import std.conv;
  import std.stdio;

  File input;
  foreach(line; input.byLine())
  {
  }
}</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>