0

I did OpenSSL setup referencing How to install OpenSSL 1.1.1 and libSSL package? on windows subsystem Ubuntu 18.04. Writing CPP file in which using OpenSSL files:

#include <cstring>
#include <string>
#include <cmath>
#include <openssl/bn.h>

When compile, It is giving me an error:

fatal error: 'openssl/bn.h' file not found

If I check, this file exists in /usr/include/openssl/ and /opt/openssl/include/openssl. New to such errors, please help.

Edit:

I am writing a EOSIO smart contract in which I am including the above file. And when compiling using:

eosio-cpp catcatshamir.cpp -o catcatshamir.abi

Getting the above errors. EOS files are stored here /usr/opt/eosio.cdt/1.7.0/include and no errors for included header files from here.

Varsh
  • 101
  • 1
  • 6

1 Answers1

4

I think you are probably missing libssl-dev.

  sudo apt-get install libssl-dev
ognjen011
  • 1,291
  • 12
  • 15
  • This is already installed. If I try again, it returns `libssl-dev is already the newest version (1.1.1g-1+ubuntu18.04.1+deb.sury.org+1).` – Varsh Dec 16 '20 at 07:00
  • Can you install sudo apt-get install libcurl4-openssl-dev – ognjen011 Dec 16 '20 at 07:14
  • It returns, `libcurl4-openssl-dev is already the newest version (7.58.0-2ubuntu3.12).` – Varsh Dec 16 '20 at 07:15