nginx c++ module开发

2020/09/26 nginx 共 277 字,约 1 分钟

nginx c++ module开发

  • CPP/H文件添加extern “C”

    extern "C" {
    #include <ngx_config.h>
    #include <ngx_core.h>
    #include <ngx_http.h>
    }
    
  • 修改Makefile支持CPP编译和链接

    build/nginx-1.13.6/objs/Makefile

    CXX = g++
    LINK = $(CXX)
    CXXFLAGS =  -pipe  -O -W -Wall -std=c++11 -Wpointer-arith -Wno-unused-parameter -Werror
    

    待细化。。。

文档信息

Search

    Table of Contents