Closed peterokwara closed 5 years ago
Hey; glad you used the tool. I assume you have resolved the issue by yourself or that you have closed this issue with help from someone else. However, in case you want extra clarification on this particular issue (or for others who are experiencing similar confusion), there is a way to deploy contracts requiring other .cpp
or .hpp
files.
Using the guide as a reference point, it is possible to bundle dependencies for your main .cpp
file by organizing the folder accordingly. In the screenshot on that page, you can see that the .cpp
file has the line #include "helpers/Characters.hpp
, pointing to the ./helpers/Characters.hpp
file in the Root Folder Path (so, the helpers
folder has to be a sub-directory in the root folder path).
If you want to use #include <eosio.token/eosio.token.hpp>
as an example, you would have to rewrite it as #include "eosio.token/eosio.token.hpp"
and ensure that the eosio.token
folder is a sub-directory of your working project folder.
I hope this is clearer for you and helps you to understand how to develop more complex smart contracts using the tool.
Thanks, what you have explained is what I did to make it run.
By changing the location of the header file to
and changing the #include of the cpp file to
I was able to point to the cpp file to the /src folder and was able to compile and upload the smart contract
I am unable to deploy a contract which has an added header file in this.
An example of this is depoying the eosio.token contract whose .cpp file requires a .hpp file (#include <eosio.token/eosio.token.hpp>)
Any way around this?