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.
(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.