<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    JUST DO IT ~

    我只想當個程序員

    make libevent with openssl on windows

    make libevent with openssl on windows
    build: 
    libevent-2.0.22-stable
    openssl-1.0.2c 
    1.build openssl 
      
    If you want to build openssl In Windows ,  You must install nasm && perl . 
    1)downs lib
       
      https://www.openssl.org/related/binaries.html  
      copy c:\openssl 
     
    2)build lib
    2.1)
       setup  nasm tools .
       http://nasm.sourceforge.net/
       setup perl .
       http://downloads.activestate.com/ActivePerl/releases/5.18.4.1804/ActivePerl-5.18.4.1804-MSWin32-x64-298913.msi
    2.2)  
       perl Configure VC-WIN32 --prefix=c:\openssl
    2.3)
       ms\do_nasm
    2.4)
      nmake -f ms\ntdll.mak
      nmake -f ms\ntdll.mak test
      nmake -f ms\ntdll.mak install
    You can also build a static version of the library using the Makefile
    ms\nt.mak

    readme:  
    https://github.com/openssl/openssl/blob/master/INSTALL.W32

    2.build libevent 

    wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
    tar xvf libevent-2.0.21-stable.tar.gz
    cd libevent-2.0.X-stable
    set OPENSSL_DIR=c:\openssl
    nmake -f makefile.nmake

    but, makefile.nmake haven't support ssl.

    You have 2 choose.

    one :   down   makefile.nmake at  https://github.com/libevent/libevent/blob/master/Makefile.nmake
            you need add  /DWIN32 at CFLAGS 
    two:
     makefile.nmake

    # WATCH OUT!  This makefile is a work in progress.             -*- makefile -*-
    #
    # I'm not very knowledgeable about MSVC and nmake beyond their most basic
    # aspects.  If anything here looks wrong to you, please let me know.
    # If OPENSSL_DIR is not set, builds without OpenSSL support.  If you want
    # OpenSSL support, you can set the OPENSSL_DIR variable to where you
    # installed OpenSSL.  This can be done in the environment:
    #   set OPENSSL_DIR=c:\openssl
    # Or on the nmake command line:
    #   nmake OPENSSL_DIR=C:\openssl -f Makefile.nmake
    # Or by uncommenting the following line here in the makefile...
    # OPENSSL_DIR=c:\openssl
    !IFDEF OPENSSL_DIR
    SSL_CFLAGS=/I$(OPENSSL_DIR)\include /DEVENT__HAVE_OPENSSL
    !ELSE
    SSL_CFLAGS=
    !ENDIF
    # Needed for correctness
    CFLAGS=/IWIN32-Code /IWIN32-Code/nmake /Iinclude /Icompat /DHAVE_CONFIG_H  /DWIN32 /I. $(SSL_CFLAGS)
    # For optimization and warnings
    CFLAGS=$(CFLAGS) /Ox /W3 /wd4996 /MTd /nologo 
    # XXXX have a debug mode
    LIBFLAGS=/nologo
    CORE_OBJS=event.obj buffer.obj bufferevent.obj bufferevent_sock.obj \
    bufferevent_pair.obj listener.obj evmap.obj log.obj evutil.obj \
    strlcpy.obj signal.obj bufferevent_filter.obj evthread.obj \
    bufferevent_ratelim.obj evutil_rand.obj 
    WIN_OBJS=win32select.obj evthread_win32.obj buffer_iocp.obj \
    event_iocp.obj bufferevent_async.obj
    EXTRA_OBJS=event_tagging.obj http.obj evdns.obj evrpc.obj
    !IFDEF OPENSSL_DIR
    SSL_OBJS=bufferevent_openssl.obj
    SSL_LIBS=libevent_openssl.lib
    !ELSE
    SSL_OBJS=
    SSL_LIBS=
    !ENDIF
    ALL_OBJS=$(CORE_OBJS) $(WIN_OBJS) $(EXTRA_OBJS) $(SSL_OBJS)
    STATIC_LIBS=libevent_core.lib libevent_extras.lib libevent.lib $(SSL_LIBS)
    all: static_libs tests
    static_libs: $(STATIC_LIBS)
    libevent_core.lib: $(CORE_OBJS) $(WIN_OBJS)
    lib $(LIBFLAGS) $(CORE_OBJS) $(WIN_OBJS) /out:libevent_core.lib 
    libevent_extras.lib: $(EXTRA_OBJS)
    lib $(LIBFLAGS) $(EXTRA_OBJS) /out:libevent_extras.lib
    libevent.lib: $(CORE_OBJS) $(WIN_OBJS) $(EXTRA_OBJS)
    lib $(LIBFLAGS) $(CORE_OBJS) $(EXTRA_OBJS) $(WIN_OBJS) /out:libevent.lib
    libevent_openssl.lib: $(SSL_OBJS)
    lib $(LIBFLAGS) $(SSL_OBJS) /out:libevent_openssl.lib
    clean:
    del $(ALL_OBJS)
    del $(STATIC_LIBS)
    tests:
    !IFDEF OPENSSL_DIR
     
    !ELSE
     
    !ENDIF
     
    ----------------------------------------------------------------
    c:\openssl>tree
    C:.
    ├─bin
    ├─include
    │  └─openssl
    ├─lib
    │  └─engines
    └─ssl
    c:\openssl>
    提示找不到 unsigned long bufferevent_get_openssl_error(struct bufferevent *bev);
    這方法,是要打開一個宏定義.
    #define _EVENT_HAVE_OPENSSL
    #include <event2/bufferevent_ssl.h>
    windows下編譯及使用libevent
    http://www.cnblogs.com/luxiaoxun/p/3603399.html
    ln -s  /usr/local/ssl/include/openssl    /usr/include/openssl  
    重新make就過去了
    I cannot use VC build   openssl-1.0.2c , must be nasm tools .
    libeay32.lib(cryptlib.obj) : error LNK2019: 無法解析的外部符號 _OPENSSL_ia32_cpu
    id,該符號在函數 _OPENSSL_cpuid_setup 中被引用
    libeay32.lib(sha1dgst.obj) : error LNK2019: 無法解析的外部符號 _sha1_block_data_
    order,該符號在函數 _SHA1_Update 中被引用
    libeay32.lib(sha256.obj) : error LNK2019: 無法解析的外部符號 _sha256_block_data_
    order,該符號在函數 _SHA256_Update 中被引用
    libeay32.lib(sha512.obj) : error LNK2019: 無法解析的外部符號 _sha512_block_data_
    order,該符號在函數 _SHA512_Final 中被引用
    libeay32.lib(md5_dgst.obj) : error LNK2019: 無法解析的外部符號 _md5_block_asm_da
    ta_order,該符號在函數 _MD5_Update 中被引用
    out32\md4test.exe : fatal error LNK1120: 6 個無法解析的外部命令
    NMAKE : fatal error U1077: “"c:\Program Files (x86)\Microsoft Visual Studio 10.
    0\VC\BIN\link.EXE"”: 返回代碼“0x460”
    Stop.
    bufferevent_openssl.c
    Microsoft (R) 程序維護實用工具 10.00.30319.01 版
    版權所有(C) Microsoft Corporation。保留所有權利。
            cl /IWIN32-Code /Iinclude /Icompat /DWIN32 /DHAVE_CONFIG_H /I. /Ox /W3 /
    wd4996 /nologo /MT /c bufferevent_openssl.c
    bufferevent_openssl.c
    bufferevent_openssl.c(60) : fatal error C1083: 無法打開包括文件:“openssl/bio.h
    ”: No such file or directory
    NMAKE : fatal error U1077: “"c:\Program Files (x86)\Microsoft Visual Studio 10.
    0\VC\BIN\cl.EXE"”: 返回代碼“0x2”
    Stop.
    ftp://sourceware.org/pub/pthreads-win32/dll-latest
    http://www.aerospike.com/docs/client/libevent/build/windows.html
    Download pthread include, lib and dll folder from : ftp://sourceware.org/pub/pthreads-win32/dll-latest
    國外一個類似memcache產品 openssl+ libevent 客戶端
    http://www.aerospike.com/docs/client/libevent/build/windows.html

    構建靜態庫:
    http://developer.covenanteyes.com/building-openssl-for-visual-studio/

    Linux 匯編器:對比 GAS 和 NASM
    http://www.ibm.com/developerworks/cn/linux/l-gas-nasm.html

    posted on 2015-07-01 10:36 小高 閱讀(2588) 評論(0)  編輯  收藏 所屬分類: CNetwork| Socket | 進程間通訊工作環境搭建

    導航

    <2015年7月>
    2829301234
    567891011
    12131415161718
    19202122232425
    2627282930311
    2345678

    統計

    常用鏈接

    留言簿(3)

    隨筆分類(352)

    收藏夾(19)

    關注的blog

    手冊

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲成a人片在线观看中文!!! | 亚洲av无码一区二区三区在线播放| 日本一卡精品视频免费| 亚洲爆乳无码一区二区三区| h片在线播放免费高清| 亚洲中文字幕视频国产| 伊人久久大香线蕉免费视频| 国产亚洲成AV人片在线观黄桃| a级午夜毛片免费一区二区| 亚洲AV永久纯肉无码精品动漫| 亚洲免费精彩视频在线观看| 亚洲一区二区在线视频| 99无码人妻一区二区三区免费| 亚洲国产精品一区二区三区在线观看| 大地资源免费更新在线播放| 亚洲色欲啪啪久久WWW综合网| 国产成人3p视频免费观看 | 国产精品久免费的黄网站| 黄色网址大全免费| 亚洲午夜福利在线观看| 无码少妇精品一区二区免费动态| 亚洲精品午夜视频| 男女啪啪永久免费观看网站| 四虎永久在线精品免费一区二区| 亚洲AV无码久久| 成年女人午夜毛片免费视频| 深夜特黄a级毛片免费播放| 亚洲一区爱区精品无码| 国产成人精品免费视频网页大全| 亚洲精品无码高潮喷水A片软| 亚洲尤码不卡AV麻豆| 无码国产精品一区二区免费式影视 | 亚洲日韩精品无码AV海量| 亚洲色婷婷综合开心网| 99热在线免费播放| 真正全免费视频a毛片| 亚洲av无码成h人动漫无遮挡| 女人18特级一级毛片免费视频| 中文在线免费不卡视频| 亚洲国产成人精品青青草原| 亚洲精品成人网久久久久久|