The Apache Haus Forum

Advanced search  

News:

Welcome to Apache Haus Distribution Forum

Pages: [1]   Go Down

Author Topic: Compile errors building mod_ssl  (Read 1793 times)

swanman

  • Newbie
  • *
  • Offline Offline
  • Posts: 2
Compile errors building mod_ssl
« on: May 08, 2017, 06:48:52 PM »

Compile 2.4.25, openssl 1.02k, but get compile errors when building mod_ssl

mod_ssl.c
mod_ssl.c(38) : error C2491: 'ssl_run_pre_handshake' : definition of dllimport function not allowed

Any idea how to fix this?
Logged

Gregg

  • Administrator
  • Member Elite
  • *****
  • Offline Offline
  • Posts: 833
Re: Compile errors building mod_ssl
« Reply #1 on: May 08, 2017, 11:04:51 PM »

On Windows, everything defaults to __declspec(dllimport) unless told otherwise. In all the ways to build Apache on MSVC that are currently available it's handled by the makefiles. So I have to ask how are your trying to build this?

However regardless of how your building it, -DSSL_DECLARE_EXPORT must be in the CFLAGS.

Then again, Line 36-38 is:
Code: [Select]
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ssl, SSL, int, pre_handshake,
                                    (conn_rec *c,SSL *ssl,int is_proxy),
                                    (c,ssl,is_proxy), OK, DECLINED);

This however is controlled by APR or APR-Util I cannot remember which. You may need these in your cflags as well but they should have been obtained from apr.h and apu.h via httpd.h which is called in mod_ssl.h
.
-DAPR_DECLARE_EXPORT or -DAPU_DECLARE_EXPORT.

 
Logged

swanman

  • Newbie
  • *
  • Offline Offline
  • Posts: 2
Re: Compile errors building mod_ssl
« Reply #2 on: May 09, 2017, 09:58:13 PM »


Adding the /D SSL_DECLARE_EXPORT to the makefile worked.

Much appreciated.
Logged
Pages: [1]   Go Up
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13