Questions tagged [eosiocpp]

Questions about the deprecated (old) eosiocpp compiler tool. These are different from the new Version eosio-cpp.

Filter by
Sorted by
Tagged with
4
votes
2answers
699 views

How to get current time in different versions of EOSIO

Depending on which version of EOSIO you use, there are different options available for finding the current time. What are they?
3
votes
6answers
502 views

eosiocpp -g generates empty abi file

I have created smart contract inside the /build/contracts and running this comman generates empty abi file. eosiocpp -g eosio.test.abi eosio.test.cpp tried both hpp and cpp but same result.
3
votes
1answer
266 views

Error 3160009: No wast file found

The hello world contract is not getting compiled in the EOS v1.3 and eosio.cdt. The wasm and abi file is getting created but goes undetected. https://github.com/EOSIO/eos/issues/5349
2
votes
2answers
620 views

Unable to compile eosio.token

I'm following the https://developers.eos.io/eosio-home/docs/token-contract block one tutorial using the latest eosio/eos-dev docker image (v1.4.0). I have some issues when I compile eosio.token.cpp ...
2
votes
2answers
491 views

How to solve fatal error: 'eosiolib/types.hpp' file not found #include <eosiolib/types.hpp>?

After installing eosio.cdt 1.4.1, I am receiving this error from the compilation of my code where is included the header file eosiolib/types.hpp: fatal error: 'eosiolib/types.hpp' file not found ...
2
votes
2answers
617 views

eosio-cpp: command not found

Is there an alias or PATH that we need to set for eosio-cpp to be accessible? Here's what I'm seeing: ~/eos/contracts/youvote $ eosio-cpp --help eosio-cpp: command not found I can access it via: ~/...
2
votes
2answers
87 views

How to use std::tuple with eosiocpp?

I am trying to use typedef std::tuple<double, double> location_t; to create a simple tuple with latitude and longitude, but eosiocpp gives me 2018-09-02T12:54:47.310 thread-0 main.cpp:105 ...
1
vote
1answer
108 views

EOSIO_ABI macro problem on MacOS, can't use for contract implementations

I have been fighting a bit with the EOSIO_ABI macro in C++. I am trying to implement a very simple Ping/Pong contract using the latest eosio.cdt tools installed on my machine. When I try to compile ...
1
vote
0answers
15 views

unordered map in eosio-cpp

I want to have an unordered_map inside a table so that I can have O(1) entry and retrieval. Can someone please link me to a snippet which implements that? I am new to cpp.
1
vote
1answer
85 views

On method call: “assertion failure with message: read”

I am calling a method that is completely commented out. I am calling it from EOStudio and from command line tools. Is this a bug or does someone know how to fix this? assertion failure with message: ...
1
vote
2answers
152 views

EOS Block Producer Schedule

I have followed the Boot Bios sequence of eosio and setup a eos private blockchain. The problem is my even though i have created also Block producers and also voted for them still the blocks are ...
1
vote
2answers
96 views

How to interface EOSIO smart contract with android dapp [duplicate]

I have been going through this To do Dapp tutorial how can I interface/build an android app for this?.
1
vote
0answers
50 views

Why can eosiocpp not do normal operations on std::vector<std::string>?

I have two types: struct typeA { std::vector<std::string> vec; } struct typeB { std::vector<std::string> vec; } but I can't seem to get the 2 vecs to mix as eosiocpp seems to be ...
1
vote
1answer
54 views

How do I use C++11 on Mac?

I tried the hello world sample contract, and when it came time to compile, I got this error: hello.cpp:10:10: error: expected ']' [[eosio:action]] ^ ...
1
vote
0answers
166 views

eosio-cpp Compile error: undefined symbol: apply [duplicate]

Compile error: undefined symbol: apply I got the exact same problem as above but the alternative command doesn't work for me. I don't have eosiocpp instead of eosio-cpp. Can anybody please help me? ...
0
votes
1answer
31 views

Understanding EOSIO voting mechanism and decay

I have a question on eosio-voting and decay. Suppose there are only 21 block-producers (registered) and only 10 users having equally eos-token. These users now voting for each block-producers, it mean ...
0
votes
0answers
18 views

EOSIO - HttpClient return 201 response code

Using json-rpc-cpp library, I am creating EOS Wallet using wallet RPC. HttpClient *temp = new HttpClient("http://127.0.0.1:30031/v1/wallet/create"); string res; string str = "testwallet1"; temp->...
0
votes
1answer
29 views

what are supported STL types in tables?

What are the supported STL types in tables? I'm specifically curious about std::pair
0
votes
1answer
112 views

Casting checksum256 type to uint64_t type

I have a checksum256 type, I want to reach its specific elements as an integer. Ex cheksum256 myvar = 3dd6a4a0c86763d2a6fc1d5544eb58f3953b7cd03882e700b420fa0a89129f66; I want myvar[0] and myvar[2] ...
0
votes
1answer
145 views

How can I create a table in an .hpp for a general contract? (Using the CDT)

THE STRUCTURE OF MY PROJECT I am working in mycontract.cpp, which imports myheader.hpp WHAT I WANT I want to create a table in myheader.hpp, for a generic contract, "IN THEORY" as follows: struct [...
0
votes
1answer
149 views

Contract Table Query Exception

As i was following eosio developers documentation #include <eosiolib/eosio.hpp> #include <eosiolib/print.hpp> using namespace eosio; using namespace std; class addressbook : public ...