Am 10/17/2012 8:37 PM, schrieb undefined reference linux:

When using json like below, I get undefined references. Perhaps import
statements inside a function do not export for the linker? When I move
the two lines to the top of the file it works. This is on linux.

(...)

rdmd, which is used by the vibe script, parses the output of dmd -deps
to calculate the neede files. Unfortunately, dmd's output only includes
global imports and neither local imports, nor string imports.

There is DMD bug report for this, but it didn't get attention yet:
http://d.puremagic.com/issues/show_bug.cgi?id=7016