大方法:
     模块使用C++ 编译。
     nginx服务器也需要使用C++编绎。

1.在模块中,
extern "C" {
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
}
引入"C"模块。

2.在objs/Makefile中,修改, 
CPP =   g++
LINK =  $(CPP)

其中,对于该模块,使用$(CPP)进行编绎。
3.如果觉得麻烦,需要每次configure之后都要再修改的话,可以直接修改源码目录下 auto/make 里的
CPP = g++
LINK = g++
和将
# the addons sources 下的ngx_cc 改成 $(CPP) , 这样会将所有的模块都变成g++编译,可以通过后缀名来判断使用什么编译器来编译。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
  • 2022-03-06
  • 2022-02-07
猜你喜欢
  • 2021-07-12
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
相关资源
相似解决方案