Bug 16258 – std.net.curl (download) failed

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2016-07-09T14:59:03Z
Last change time
2020-03-21T03:56:36Z
Assigned to
No Owner
Creator
skelic

Comments

Comment #0 by skelirox — 2016-07-09T14:59:03Z
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 by b2.temp — 2016-07-09T21:04:03Z
(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.