solidity-stringutils
solidity-stringutils copied to clipboard
Question: Importing the Library
I try to import it like in the Readme
import "github.com/Arachnid/solidity-stringutils/strings.sol";
contract Mortal {
...
But when I try to build it with truffle
I get this:
Cannot find import strings.sol from Test.sol. If it's a relative path, ensure it starts with `./` or `../`.
Compilation failed. See above.
How to do import it?
I read something here, that the compiler reads during dev from /usr/local/dapp-bin/library
http://ethereum.stackexchange.com/questions/2137/how-should-we-set-a-import-path-in-solidity
So do I need to download the repo into that folder?
How are you compiling this? github imports work fine in browser solidity, but if you're compiling from the command line, you should download the library and put it somewhere the compiler can reach, updating the import path to match.
Thx, I do compile it from the command line. So I probably need to check out if I configure a libraries directory in truffle?
Yes, whatever library support your framework has; putting it in the same directory will almost certainly work too.