M
M
Maxim Barulin2014-05-13 10:40:47
OpenSSL
Maxim Barulin, 2014-05-13 10:40:47

How to build a c++ application with openssl?

Good day,% habrauser%!
It is impossible to assemble the simplest application for data encryption in any way. Google does not provide an answer.
An error constantly occurs:
g++: error: openssl.c: No such file or directory
I found this file in the sources, I tried to include it through the -I parameter of the compiler, through #include directly into the project - no effect. Openssl tried both to install through the installer and build from source.
Tell me what's wrong?
Windows 7 system.
I collect through Netbeans.
Included header files:

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <cstdlib>
#include <unistd.h>
#include <openssl/conf.h>
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
#include "openssl/bio.h"
#include <string>

Compiler options:
g++ -m32 -o openssl openssl.c -lssl -lcrypt -L c:/cygwin/usr/local/ssl/lib/   -c -g -include /cygdrive/c/cygwin/usr/local/ssl/include/ -MMD -MP -MF "build/Debug/Cygwin_4.x-Windows/function.o.d" -o build/Debug/Cygwin_4.x-Windows/function.o function.cpp

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xandox, 2014-05-13
@Slavenin999

>g++: error: openssl.c: No such file or directory
If I understand you correctly, then you are not building openssl, but an application that should work with it, then you don’t need this openssl.c
1) Make sure that you have openssl installed on the car. Together with header files and libraries
2) In order to build your project, you need something like this
your binary will be called my_openssl_use

A
Artem, 2014-05-13
@Properrr

Hello cat. Source codes of the compiled project to the studio!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question