v icon indicating copy to clipboard operation
v copied to clipboard

compile custom module,but nothing happen

Open tonylinyy opened this issue 7 years ago • 4 comments

here is sample code: module mymodule

fn add(x,y int) int { return x+y } then: v ./mymodule.v but,nothing happen in main module import mymodule got a panic: V panic: /Users/alex/code/lang//mymodule doesnt exist

tonylinyy avatar Apr 22 '19 14:04 tonylinyy

After I release 0.0.2 with the panic fixed, try creating mymodule dir and then run

v -lib mymodule

medvednikov avatar Apr 22 '19 14:04 medvednikov

0.0.2 is out, please try it.

medvednikov avatar Apr 23 '19 13:04 medvednikov

I tried,it works,so exciting... I found the custom module will be comiled to /var/tmp/lang/vlib,It is ok now may be we can set the VPATH in the future,just like GOPATH :)

tonylinyy avatar Apr 23 '19 13:04 tonylinyy

Of course, it will be flexible. I literally built this this morning :)

medvednikov avatar Apr 23 '19 14:04 medvednikov