Serpent compile error and how to link the serpent compiler to Geth?

starstarstarstar Member Posts: 19
edited June 2016 in Serpent
I can run the serpent compiler on the command line, when I dont provide any arguments, it asks for command inputs (either "parse", "rewrite", "compile", "assemble").

I tried to compile the example:
def double(x):
    return(x*2)
using serpent compile mul2.se, however I get the error:
Error (file "mul2.se", line 1, char 12): Not a function or opcode: def
terminate called after throwing an instance of 'std::string'
Aborted (core dumped)
What's wrong with my source code?

Also, I would like to keep working with the geth-1.4.6 console and link the serpent compiler to it (solidity compiler is working). How do I do that? When I try to run

eth.compile.serpent("")

I get
The method eth_compileSerpent does nto exist/is not available
[...]
I only found how to link the solidity compiler (using eth.getSolc)

Help is greatly appreciated.

Comments

Sign In or Register to comment.