libbitcoin / libbitcoin-system

Bitcoin Cross-Platform C++ Development Toolkit

Home Page:https://libbitcoin.info/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After linking libbitcoin-system to other C++ projects it gives many crazy errors in Windows 10.

KPLK opened this issue · comments

commented

I downloaded the libbitcoin-system-3.6.0 from the release link to my Windows 10 PC and built it running the build_all.bat at libbitcoin-system-3.6.0\builds\msvc\build

Afterwards I fired visual studio 2015 and created a new C++ project and linked include directories at libbitcoin-system-3.6.0\include. But I couldn't find any lib folder. Afterwards I built the project with some libbitcoin-system code but those code lines can not recognized by the IDE and there are build errors. I'm very sure the include directory I linked is not the one to link.

Even though I searched the drive for include and lib directories it brought me nothing.

Where can I find the include and lib folders of the libbitcoin-system-3.6.0 git-hub library are located in windows after built with visual studio 2015 on windows 10 to link for custom C++ projects.

The code I compiled is mentioned below.

// libbitcoin-firstprogram.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <stdio.h>
#include <bitcoin/bitcoin.hpp>
#include <string.h>
#include <iostream>

using namespace bc;

int main()
{
	data_chunk seed(16);
	pseudo_random_fill(seed);
	ec_secret secretKey = bitcoin_hash(seed);

	wallet::ec_private compressedPrivateKey(secretKey, 0x8000, true);
	wallet::ec_private nCompressedPrivateKey(secretKey, 0x8000, false);

	std::cout << "compressedPrivateKey: " << compressedPrivateKey.encoded() << std::endl;
	std::cout << "\nnCompressedPrivateKey: " << nCompressedPrivateKey.encoded() << std::endl;


	puts("\n\nPress return to close the window...");
	getchar();
    return 0;
}

Errors mentioned in the visual studio are attached here.

enter image description here

Compiler output also available below.

1>------ Build started: Project: libbitcoin-firstprogram, Configuration: Debug Win32 ------
1>  libbitcoin-firstprogram.cpp
1>c:\users\kanchana\source\repos\libbitcoin-system-3.6.0\include\bitcoin\bitcoin\math\hash.hpp(25): fatal error C1083: Cannot open include file: 'boost/functional/hash_fwd.hpp': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

After I linked boost_1_79_0 to the program. Then it returned this crazy output in the attached text file.

Click output.txt to view the output.

The solution contains three projects. One is an example project, which demonstrates the use of the library. Paths are set in supporting .props files.

You must also set up boost and libsecp256k1 NuGet dependencies. See readme.md.

Closed for inactivity.