U Boot . How to read nand from standalone app?

Hello.
I have another quest related my last activity of building u-boot nested app. So I tried to create my own standalone application (like hello_world from examples/standalone). And I need to read/write memory from nand. What I tried briefly looks like

#include <nand.h>
    struct mtd_info *mtd = get_nand_dev(0);
    ret = mtd_read(mtd, 0x1A0000, &size, (size_t *)size, bb);

But compiles says:
undefined reference to `mtd_read'
Also I tried more high leveled funcs line nand_read and etc. The same wrong result. But I connected nand.h and other headers. Added -I value to Makefile.
What things I missed?
Thanks