According to an official document, compiling a smart contract needs to remove all the line-breaks in the contract's source-code:
If you have the SolC Solidity Compiler installed, you need now reformat by removing spaces so it fits into a string variable.
var greeterSource = 'contract mortal { address owner; function mortal() { owner = msg.sender; } function kill() { if (msg.sender == owner) suicide(owner); } } contract greeter is mortal { string greeting; function greeter(string _greeting) public { greeting = _greeting; } function greet() constant returns (string) { return greeting; } }'
var greeterCompiled = web3.eth.compile.solidity(greeterSource)
As I think the removing process is not smart, I want to compile the code itself without stripping the line break manually.
Does anyone know how to do that?