5

If you used sudo make install, then you should use the eosiocpp binaries generated for you. In the latest version, I believe they shoud be in /usr/local/eosio/bin/ (it should print this info when sudo make install is finished if it's a different path) so add that to your $PATH: $ export PATH=/usr/local/eosio/bin/:$PATH $ which eosiocpp /usr/bin/eosio/bin/...


3

I had the same error, and filed a bug (which has been assigned). A short-term fix supplied by someone, which seems to work: go into build/contracts, run make, return to top level and run the original build script again.


3

I solved the problem - the problem was caused by the fact I was not setting default constructors for each class that produced this error message. class x { // Private variables public: x(){/* Default constructor here */} }; This solved the problem. It seems that all classes that are to be used as multi_index arrays need a default constructor, even if ...


2

With eosio.cdt, it is now possible to compile object code which can then be tested using unit tests. Check out https://eosio.github.io/eosio.cdt/1.5.0/guides/native-tester.html for a detailed guide. Below is the quoted text from the link at the time of writing this answer (in case the web page is moved or something) Native Tester/Compilation As of ...


2

This is a workaround based on @KemmyGuo 's comment: You can include the additional .cpp files (which have to be in the same folder) into your contracts .cpp file. Disclaimer: this is not a good C++ coding style, but it works for the moment. In my case inside the test.cpp this did the trick #include "test.h" #include "JSON.cpp" #include "JSONValue.cpp" ...


2

I think it has to do with the most recent EOSIO git repo having the boost root as ~/opt/boost and the CMake is looking for something like ~/opt/boost__1__6__6 The way I solved this is by importing the entire EOSIO folder into Clion (after doing ./eos_build.sh and sudo ./eos_install.sh) and going to File ==> Settings ==> Build, Execution, Deployment ==> ...


2

I had this as a comment, but as I work more myself, I'm realizing that this is as good as it's going to get for now, and my comment is really easy to miss... I got contracts to compile. Block.one has this on their radar, but until this is fixed for real by people who know what they're doing, I put together a kludge that at least gets the tutorial working. ...


2

You may have written several constructors for your BP class, but do you have a default constructor? All classes that are to be used as multi_index arrays require that the class has a default constructor, even if it is blank. The default constructor for BP would look like: class BP { // Your stuff here public: BP(){/* Your default constructor here */} };...


2

This is a known issue for eosiocpp in version 1.1.2/1.1.3 of the eosio/eos Github repo. Switching to version 1.1.0 solved the problem for me and a colleague. Here's a host of issues relating to the problem: Github 5015 Github 5039 Github 5040 Github 4974


2

Define your variables in the environment variable EOSIOCPP_CFLAGS. If you are curious, just open the eosiocpp file (it's a bash script, a wrapper over clang) to see how the variable is used.


2

"requestLoan" isn't a valid name for an EOSIO table; it only supports lower-case names using alpha characters. https://developers.eos.io/eosio-cpp/docs/naming-conventions#section-table-names-structs-functions-classes


2

It is possible: Set up a new smart contract environment using eosio-init: eosio-init -project=mycontract -path=. Create all of your .cpp and .hpp files as appropriate In the ./src folder, edit the CMakeLists.txt file by adding all of the .cpp files to the add_contract command, making sure that the file containing your contract class is the last file in ...


2

The solution to my problem was that the wasm file had to exactly match the name of the contract in the attributes of the contract class. So as my file was called mycontract.wasm, I had to have the following in my contract class: class [[eosio::contract("mycontract")]] token : public contract { // the name of the class must be mycontract ... }; After this, ...


1

I have solved the issue by using below commands sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.9 sudo apt-get install --only-upgrade libstdc++6


1

Theoretically C++ is the most efficient language, since it is the native language for wasm, no one thinks of writing assembly by hand. Next are Rust and Go, these probably add some overhead since they provide additional help for the programmer. TypeScript would probably add the most overhead but it really depends on the use case. There are not a lot of ...


1

As a workaround, revert locally the commit which introduced a regression, then build and install again: cd $HOME/eos git revert -n 67393d7 ./eosio_build.sh cd build sudo make install eosiocpp should work now fine. Full details within: https://github.com/EOSIO/eos/issues/5133


1

The EOS smart contracts do not have file system. Thus, you cannot use file system functions. Practical thinking for the homework: Where would the file reside as the code is executed on a block producer? The block producers cannot access your hard disk.


Only top voted, non community-wiki answers of a minimum length are eligible