We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
while I imported the library and compiled, it return warning
strings.sol:37:1: Warning: Source file does not specify required compiler version!Consider adding "pragma solidity ^0.4.7 library strings {
then, added the "pragma solidity ^0.4.7" and compiled again, it returns error
[root@localhost contracts]# truffle compile Compiling ./contracts/Ballot.sol... Compiling ./contracts/strings.sol... Compiling strings.sol... Error compiling: /home/xuhuan/contract/c2/contracts/strings.sol:39:1: Error: Library "strings" declared twice (will create ambiguities during linking). library strings { ^ Spanning multiple lines. The other declaration is here: strings.sol:39:1: library strings { ^ Spanning multiple lines.
The text was updated successfully, but these errors were encountered:
It sounds like you're including the library more than once, via a relative path and an absolute path. What do your import statements look like?
Sorry, something went wrong.
I solved this problem using the full path to imported file
use import './strings.sol'; while importing the library and keep both files in same directory
import './strings.sol';
No branches or pull requests
while I imported the library and compiled, it return warning
then, added the "pragma solidity ^0.4.7" and compiled again, it returns error
The text was updated successfully, but these errors were encountered: