Downloaded the SMTP Client with SSL/TLS library from link: [https://www.codeproject.com/Articles/98355/SMTP-Client-with-SSL-TLS][1].
Included the CSmtp.h file in my Netbeans project "Header Files" folder, which gets rid of error for the main.cpp file.
I got the compilation error of "fatal error: openssl\ssl.h: No such file or directory" before adding the "openssl" folder to root of netbeans project directory.
Now after adding the "openssl" folder, I am getting the error:
fatal error: openssl/e_os2.h: No such file or directory
Error in Netbeans Console:
CLEAN SUCCESSFUL (total time: 1s)
cd 'C:\Users\Nicholas1\Documents\NetBeansProjects\DemoCppEmail'
C:\cygwin64\bin\make.exe -f Makefile CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/cygdrive/c/Users/Nicholas1/Documents/NetBeansProjects/DemoCppEmail'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/democppemail.exe
make[2]: Entering directory '/cygdrive/c/Users/Nicholas1/Documents/NetBeansProjects/DemoCppEmail'
mkdir -p build/Debug/Cygwin-Windows
rm -f "build/Debug/Cygwin-Windows/main.o.d"
g++ -c -g -MMD -MP -MF "build/Debug/Cygwin-Windows/main.o.d" -o build/Debug/Cygwin-Windows/main.o main.cpp
In file included from CSmtp.h:52:0,
from main.cpp:1:
openssl\ssl.h:173:27: fatal error: openssl/e_os2.h: No such file or directory
#include <openssl/e_os2.h>
^
compilation terminated.
make[2]: *** [nbproject/Makefile-Debug.mk:68: build/Debug/Cygwin-Windows/main.o] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/Nicholas1/Documents/NetBeansProjects/DemoCppEmail'
make[1]: *** [nbproject/Makefile-Debug.mk:59: .build-conf] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/Nicholas1/Documents/NetBeansProjects/DemoCppEmail'
make: *** [nbproject/Makefile-impl.mk:40: .build-impl] Error 2
BUILD FAILED (exit value 2, total time: 10s)
My interpretation is that the compiler is able to find the "CSmtp.h" include, "openssl/ssl.h" include, but cannot resolve "openssl/e_os2.h". Not sure why the compiler cannot resolve "e_os2.h" since ssl.h is found in the openssl folder along with "e_os2.h". Your expert advice to this compiler error will be greatly appreciated.
Firstly had to ensure openssl folder(folder with all .h files. found in openssl-0.9.8l\inc32) was in the scope of the "main.cpp" from the CodeProject implementation(CSmtp_v2_4_ssl.zip). Next edit the "ssl.h" file; now locate the declaration
change to
Change brackets to parentheses for every "No such Directory" error that is false to directory existence.