Questions tagged [compilation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
220 views

Duplicate symbol WASM compilation error when using header/hpp for contract

I'm looking to use a hpp file as an interface for multiple contracts. I've created a test contract and receiving a WASM compilation error. I based the test contract on the format used by eosio.token....
0
votes
0answers
26 views

How do I fix includePath for VSCode intellisense Ubuntu 18.04?

I'm using Ubuntu 18.04. I added "/usr/opt/eosio.cdt/1.6.3/include/**" to the includePath but #include <eosio/eosio.hpp> still gives me the red error squiggle. Can anyone help please? This -> #...
1
vote
1answer
197 views

Is it possible to compile a smart contract using g++ or clang?

I want to write and execute some unit tests on a smart contract outside of nodeos, but to do that I need to be able to compile the code the normal C++ way, using g++ or clang, so that I get object or ...
1
vote
0answers
18 views

How to view Macro extended code?

I use this command is ok: eosio-cpp hello.cpp -o hello.wasm But I want to view Macro extended code by option -E - Only run the preprocessor, I use this command: eosio-cpp hello.cpp -E And get ...
0
votes
0answers
12 views

Using eosio.cdt with Clang-Specific Compiler Options

As the cdt is build around Clang 7, is it possible to use the cdt with Clang-specific compiler options? There are some options to customize/optimize the compilation-process like -ffast-math which ...
0
votes
0answers
147 views

ABI file not generated

I have compiled a smart contract using eosio-cpp -o addbook.wasm addbook.cpp --abigen command. Compilation was successfull and wasm file got generated. But I cant find abi. eosio-cpp version is, ...
0
votes
1answer
37 views

COMPILATION ERROR error: non-type template argument is not a constant expression

what is causing this error while im compiling ? struct [[eosio::table]] requestForLoan{ uint64_t req_id; name borr_name; uint64_t borr_id; name uwr_name; uint64_t uwr_id;...
1
vote
1answer
40 views

Is it possible to set up a smart contract with multiple .cpp and .hpp files?

If we want to make our smart contract code modular, and keep each class, contract, and table in its own file, is it possible to do this, and if so, how?
0
votes
1answer
83 views

Can't use fopen, fclose, and ifstream

Here's a screenshot of the problem. This happened when I use eosiocpp to compile my .cpp file into .wast. Does the compiler not allow file reading?
3
votes
2answers
122 views

What is needed to get the EOS ~1.1.4 tutorials working on Ubuntu 16.04 (having compiled from source)?

I've found lots of info for Dawn 3.0, but there's a note in the 1.1.0 release notes that acknowledges that the EOS Developer Portal tutorials (token, exchange, helloWorld) don't work and need updating,...
2
votes
2answers
85 views

Is the a way to pass preprocessor macro to `eosiocpp` for specific types of compilation

I would like to develop my contracts in a way where I can pass a compile time flag to enable/disable debugging code so that the debugging functionality would not be compiled into the "production" ...
1
vote
1answer
123 views

Issue while compiling smart contract - eosio.cdt

I have installed eosio.cdt in Ubuntu system by using commands from EOS Developers Portal wget https://github.com/EOSIO/eosio.cdt/releases/download/v1.4.1/eosio.cdt-1.4.1.x86_64.deb sudo apt install ./...
1
vote
1answer
207 views

Why does the -abigen option in eosio.cdt not work?

When trying to compile my contract, I use the -abigen flag in order to auto-generate the necessary ABI file. This did not work, and gave no errors or warnings. The code to compile the contract is as ...
1
vote
0answers
26 views

Compiling eos software to get dlls

How can I compile EOS software on Linux or Windows to get dynamically linked libraries (DLLs) that I need in order to create an EOS wrapper to compile and deploy smart contracts from other programming ...
2
votes
1answer
68 views

static_assert failed "Types with user specified constructors (non-aggregate initializable types) are not supported

I am writing a smart contract for use with the EOSIO system contract, and am receiving this error message multiple times when I try to compile the code. I have checked my constructors and they are ...
2
votes
1answer
131 views

Constructor error message

I am writing a smart contract for use within the EOSIO system contract. I am receiving this error message multiple times: constructor for 'eosio::multi_index<13510798882111488, BP>::item' must ...
2
votes
1answer
305 views

Importing CMake Project into Clion, Unable to find BOOST_ROOT

I get the following error when importing eos (1.0 from github) as a clion project. Does anyone know where I can set BOOST_ROOT? /home/usera/clion-2018.1.3/bin/cmake/bin/cmake -DCMAKE_BUILD_TYPE=...
4
votes
3answers
574 views

Can not find <eosiolib/eosio.hpp> when compiling with eosiocpp #2

I'm trying to compile any smart contract. Let's say the skeleton one. When running eosiocpp -o it can't find the header file for eosio. Not a duplicate of Can not find <eosiolib/eosio.hpp> when ...
3
votes
1answer
53 views

What is an overhead of a smart-contracts compiled to WebAssembly using different languages?

Let's say I'm going to write a simple smart-contract to be executed in wasm. Is there any inherit overhead by the language I will use? In particular I'm interested of overhead between following ...
1
vote
0answers
43 views

nodeos compilation and missing libsoci_core.so.4.0 library

compiled and installed latest release of soci lib. set $PATH to include compiled libraries. compiled 1.1 release with sql plugin now they i try to run nodeos with sql plugin enabled i get this error: ...
5
votes
1answer
465 views

How to correctly include multiple .cpp files in eosiocpp -o?

I am trying to include a JSON-Parsing library into my smart contract. There are only two .hpp/.cpp files to link which are in the same folder as the contract. JSON and JSONValue In my contracts ...
1
vote
1answer
104 views

Dawn4 build error - eosio.token/eosio.token.wast.hpp: No such file or directory

I was able to run Dawn 3, but ran into a snag with Dawn 4: Using a fresh CentOS7 VM in VirtualBox, building the dawn-v4.0.0 tag using the eosio_build.sh: [ 80% ] Building CXX object libraries/testing/...