D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 16258 - std.net.curl (download) failed
Summary: std.net.curl (download) failed
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Linux
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-09 14:59 UTC by skelic
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description skelic 2016-07-09 14:59:03 UTC
Hi, I tried this example in here - https://dlang.org/phobos/std_net_curl.html#download , but after running gdc program.d -o program, it spit out this errors.

hello.d:2:9: error: unexpected ( in declarator
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
         ^
hello.d:2:10: error: basic type expected, not "d-lang.appspot.com/testUrl2"
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
          ^
hello.d:2:10: error: found '"d-lang.appspot.com/testUrl2"' when expecting ')'
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
          ^
hello.d:2:39: error: no identifier for declarator download(int)
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
hello.d:2:39: error: semicolon expected following function declaration
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
hello.d:2:39: error: Declaration expected, not ','
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
skelirox@pc:~$ gdc hello.d -o hello
hello.d:2:9: error: unexpected ( in declarator
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
         ^
hello.d:2:10: error: basic type expected, not "d-lang.appspot.com/testUrl2"
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
          ^
hello.d:2:10: error: found '"d-lang.appspot.com/testUrl2"' when expecting ')'
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
          ^
hello.d:2:39: error: no identifier for declarator download(int)
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
hello.d:2:39: error: semicolon expected following function declaration
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
hello.d:2:39: error: Declaration expected, not ','
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
skelirox@pc:~$ gdc-5 hello.d -o hello
hello.d:2:9: error: unexpected ( in declarator
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
         ^
hello.d:2:10: error: basic type expected, not "d-lang.appspot.com/testUrl2"
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
          ^
hello.d:2:10: error: found '"d-lang.appspot.com/testUrl2"' when expecting ')'
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
          ^
hello.d:2:39: error: no identifier for declarator download(int)
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
hello.d:2:39: error: semicolon expected following function declaration
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
hello.d:2:39: error: Declaration expected, not ','
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");


I don't think the error is because the link.
Comment 1 basile-z 2016-07-09 21:04:03 UTC
(In reply to skelic from comment #0)
> Hi, I tried this example in here -
> https://dlang.org/phobos/std_net_curl.html#download , but after running gdc
> program.d -o program, it spit out this errors.
> 
> [..]
>
> I don't think the error is because the link.

The example works fine with DMD so it's certainly a linking problem with GDC. But GDC has its own bugzilla:

http://bugzilla.gdcproject.org/

where you'll be able to report the bug, here it's D (the language itself), DMD, phobos, druntime.