title: Having problem while using shared object in Qtcreator
body: <p>I'm trying to use ESNI related method in <a href="https://github.com/sftcd/openssl" rel="nofollow noreferrer">this</a> library. I cloned and install the library using .config &amp;&amp; make &amp;&amp; sudo make install command. The shared object installed in /usr/local/lib.</p>
  
  <p>First, I checked function that I have to use(SSL_CTX_esni_server_enable) is contained in so file using nm command.</p>
  
  <pre><code>pol4bear@pol4bear:~$ nm -D /usr/local/lib/libssl.so | grep -i esni
  0000000000026bf0 T SSL_CTX_esni_server_enable
  0000000000026aa0 T SSL_CTX_esni_server_flush_keys
  0000000000026a60 T SSL_CTX_esni_server_key_status
  0000000000028070 T SSL_CTX_get_esni
  0000000000028030 T SSL_CTX_set_esni_print_callback
  00000000000266a0 T SSL_esni_checknames
  0000000000025ce0 T SSL_ESNI_dec
  00000000000280d0 T SSL_ESNI_dup
  0000000000026720 T SSL_esni_enable
  0000000000024800 T SSL_ESNI_enc
  0000000000028f80 T SSL_ESNI_ext_free
  00000000000293a0 T SSL_ESNI_ext_print
  00000000000212e0 T SSL_ESNI_free
  0000000000028040 T SSL_ESNI_get_esni
  0000000000029570 T SSL_ESNI_grease_me
  0000000000021d50 T SSL_ESNI_new_from_buffer
  0000000000023080 T SSL_ESNI_print
  0000000000028ff0 T SSL_esni_query
  0000000000029320 T SSL_ESNI_reduce
  00000000000280b0 T SSL_ESNI_set_nonce
  00000000000280a0 T SSL_ESNI_set_private
  0000000000021880 T SSL_ESNI_wrap_keyshare
  0000000000027e90 T SSL_get_esni_status
  0000000000028020 T SSL_set_esni_print_callback
  </code></pre>
  
  <p>Second I added library in Qtcreator using "Add Library" and tried to compile code below but it failed with "undefiend reference 'SSL_CTX_esni_server_enable'". How can I fix it?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include &lt;openssl/ssl.h&gt;
  #include &lt;openssl/esni.h&gt;
  
  
  using namespace std;
  
  using SSL_CTX_ptr=std::unique_ptr&lt;SSL_CTX, decltype(&amp;SSL_CTX_free)&gt;;
  
  int main()
  {
      const SSL_METHOD *method = TLS_method();
      SSL_CTX_ptr ssl(SSL_CTX_new(method), SSL_CTX_free);
      SSL_CTX_esni_server_enable(ssl.get(), "~/esni/hellven1.priv", nullptr);
      cout &lt;&lt; "Hello World!" &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>Qtcreator .pro file: $$PWD/../openssl/libssl.so and /usr/local/lib/libssl.so are same</p>
  
  <pre><code>TEMPLATE = app
  CONFIG += console c++11
  CONFIG -= app_bundle
  CONFIG -= qt
  
  SOURCES += \
          main.cpp
  
  unix:!macx: LIBS += -L$$PWD/../openssl/ -lssl
  
  INCLUDEPATH += $$PWD/../openssl
  DEPENDPATH += $$PWD/../openssl
  
  unix:!macx: LIBS += -L$$PWD/../openssl/ -lcrypto
  
  INCLUDEPATH += $$PWD/../openssl
  DEPENDPATH += $$PWD/../openssl
  </code></pre>