Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C3861 - 'SSL_set_tlsext_host_name': identifieer not found building rest-cpp for windows 10 #121

Open
frzvtr opened this issue Feb 25, 2022 · 1 comment

Comments

@frzvtr
Copy link

frzvtr commented Feb 25, 2022

I'm trying to build for windows 10 but it is failing with this error when I run the build script, I find it strange that Visual Studio 2019 can find a reference for this symbol inside a header referenced before but it still fails building.

I've only changed the .bat file in order to build in my machie:

rem   Example file on how to build under Windows
rem   using DCMAKE_PREFIX_PATH to specify where
rem   cmake's find* should look for dependencies. 

rmdir /S /Q build
mkdir build
cd build
rem -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
cmake -DCMAKE_PREFIX_PATH=C:\libraries_CPP\include;C:\libraries_CPP\include\openssl;C:\libraries_CPP\include\boost;C:\libraries_CPP\lib\x64;C:\libraries_CPP\bin\x64; -G "Visual Studio 16 2019" ..
cmake --build . --config Debug
cmake --build . --config Release
cd ..
@pause

This is the error message:

RestClientImpl.cpp                                                                                                                  
RequestImpl.cpp                                                                                                             
ReplyImpl.cpp                                                                                                           
ConnectionPoolImpl.cpp                                                                                                
C:\Users\fabiotk\Downloads\restc-cpp-0.10.0\src\TlsSocketImpl.h(74,13): error C3861: 
'SSL_set_tlsext_host_name':  identificador não encontrado [C:\Users\fabiotk\Downloads\restc-cpp-0.10.0\build\restc-cpp.vcxproj]

However the symbol is defined in C:\libraries_CPP\include\openssl\tls1.h

#define SSL_set_tlsext_host_name(s,name) \
SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,(char *)name)

My question is why the compiler can't find the symbol?

@jgaa
Copy link
Owner

jgaa commented Mar 20, 2022

Are you linking with the correct openssl libraries?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants