Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
February 13, 2015 [Issue 14176] the code has a link problem. | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14176 --- Comment #1 from steven kladitis <steven_kladitis@yahoo.com> --- the code came the tuple page on this web site. -- |
February 13, 2015 [Issue 14176] the code has a link problem. | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14176 --- Comment #2 from steven kladitis <steven_kladitis@yahoo.com> --- this is using dmd 2.066.1 for windows -- |
February 14, 2015 [Issue 14176] the code has a link problem. | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14176 --- Comment #3 from Kenji Hara <k.hara.pg@gmail.com> --- (In reply to steven kladitis from comment #0) > import std.stdio; > import std.traits; > > int foo(int x, long y); > > void Bar(R, P...)(R function(P)) > { > writeln("return type is ", typeid(R)); > writeln("parameter types are ", typeid(P)); > } > > void main() > { > Bar(&foo); > } > > > // compiles but does not link in windows A function pointer &foo should point actual function body code. But foo does not have body. Therefore it fails to link. Supplying body code to foo will fix the issue. int foo(int x, long y) { return 0; } -- |
February 14, 2015 [Issue 14176] the code has a link problem. | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14176 --- Comment #4 from Kenji Hara <k.hara.pg@gmail.com> --- (In reply to steven kladitis from comment #1) > the code came the tuple page on this web site. Note that, D supports separate compilation model. `int foo(int x, int y);` is a function declaration without its definition (== function body code), similar to: // A C lib function declaration extern(C) int printf(const char* fmt, ...); So it's not a mistake in the example code is. -- |
February 14, 2015 [Issue 14176] the code has a link problem. | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14176 --- Comment #5 from steven kladitis <steven_kladitis@yahoo.com> --- Thanks, I am trying to learn D. :) Trying examples to see what they do. -- |
June 26, 2017 [Issue 14176] the code has a link problem. | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14176 Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |dlang-bugzilla@thecybershad | |ow.net Resolution|--- |INVALID --- Comment #6 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> --- Closing as per Kenji's explanation. -- |
Copyright © 1999-2021 by the D Language Foundation