$ solc  --bin -o ./contracts SimpleStore.sol

Warning: This is a pre-release compiler version, please do not use it in product                                                                                                 ion.
SimpleStore.sol:1:1: Error: Source file requires different compiler version (cur                                                                                                 rent compiler is 0.4.18-develop.2018.12.6+commit.9cf6e910.Linux.g++ - note that                                                                                                  nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.18;
  • Can you provide the pragma directive of your smart contract? Something like pragma solidity <version>.
    – Briomkez
    Dec 6 '18 at 15:34

it looks like you compiled a nightly commit, and the pragma requires the 0.4.18 version or later. You can use a later version of solidity, or use the release version

Remember that ^0.4.18 means "0.4.18 or later", so you can simply use a later version, and that would be more secure. Just know that if you choose a 0.5.x version things may fail, since there where breaking changes, like going from function scoping to block scoping.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.