编译mysql++_无法编译MySQL++

我正在尝试使用以下命令编译MySQL++ 3.1.0:

mingw32-make -f Makefile.mingw一组文件被编译后(例如beemutex.cpp,cmdline.cpp,connection.cpp,...),我得到这些错误:

g++ -c -o mysqlpp_sql_buffer.o -g -mthreads -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -DHAVE_MYSQL_SSL_SET -I"C:\Program Files\MySQL\MySQL Server 5.5\include" -MT

mysqlpp_sql_buffer.o -MFmysqlpp_sql_buffer.o.d -MD -MP lib/sql_buffer.cpp

In file included from lib/sql_buffer.h:31:0,

from lib/sql_buffer.cpp:26:

lib/refcounted.h:258:2: error: 'size_t' does not name a type

lib/refcounted.h: In constructor 'mysqlpp::RefCountedPointer::RefCountedPointer()':

lib/refcounted.h:89:2: error: class 'mysqlpp::RefCountedPointer' does not have any field named 'refs_'

lib/refcounted.h: In constructor 'mysqlpp::RefCountedPointer::RefCountedPointer(T*)':

lib/refcounted.h:100:2: error: class 'mysqlpp::RefCountedPointer' does not have any field named 'refs_'

lib/refcounted.h:104:4: error: 'refs_' was not declared in this scope

lib/refcounted.h:104:16: error: expected type-specifier before 'size_t'

lib/refcounted.h:104:16: error: expected ';' before 'size_t'

lib/refcounted.h: In constructor 'mysqlpp::RefCountedPointer::RefCountedPointer(const ThisType&)':

lib/refcounted.h:112:2: error: class 'mysqlpp::RefCountedPointer' does not have any field named 'refs_'

lib/refcounted.h:115:8: error: 'refs_' was not declared in this scope

lib/refcounted.h: In destructor 'mysqlpp::RefCountedPointer::~RefCountedPointer()':

lib/refcounted.h:125:7: error: 'refs_' was not declared in this scope

lib/refcounted.h: In member function 'void mysqlpp::RefCountedPointer::swap(mysqlpp::RefCountedPointer::ThisType&)':

lib/refcounted.h:246:13: error: 'refs_' was not declared in this scope

mingw32-make: *** [mysqlpp_sql_buffer.o] Error 1我的配置中可能有些问题,但我找不到。看起来很奇怪,它找不到,例如,size_t。

谢谢!

平台:点击

Windows 7

MinGW 2011.09 / GCC 4.6.1

MySQL 5.5

mysql++ 3.1.0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
交叉编译 lighttpd 和 php_fpm 需要进行以下步骤: 1. 安装交叉编译工具链:根据目标平台选择合适的交叉编译工具链,例如 arm-linux-gnueabi-gcc 或者 aarch64-linux-gnu-gcc 等,并将其添加到 PATH 环境变量中。 2. 下载 lighttpd 和 php 源码:从官网下载 lighttpd 和 php 的源码包,例如 lighttpd-1.4.54.tar.gz 和 php-7.4.16.tar.gz。 3. 解压源码包:使用 tar 命令解压源码包,例如: ``` tar zxvf lighttpd-1.4.54.tar.gz tar zxvf php-7.4.16.tar.gz ``` 4. 进入 lighttpd 源码目录:进入解压后的 lighttpd 源码目录,例如: ``` cd lighttpd-1.4.54 ``` 5. 配置编译选项:使用交叉编译工具链配置编译选项,例如: ``` ./configure --host=arm-linux-gnueabi ``` 6. 编译 lighttpd:使用 make 命令编译 lighttpd,例如: ``` make ``` 7. 进入 php 源码目录:返回上级目录,进入解压后的 php 源码目录,例如: ``` cd ../php-7.4.16 ``` 8. 配置编译选项:使用交叉编译工具链配置编译选项,例如: ``` ./configure --host=arm-linux-gnueabi --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-openssl --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-short-tags --disable-phpdbg ``` 其中,--with-pdo-mysql 和 --with-mysqli 用于支持 MySQL 数据库,--with-openssl 用于支持 SSL/TLS 加密,--enable-fpm 和 --with-fpm-user、--with-fpm-group 用于编译 php_fpm。 9. 编译 php_fpm:使用 make 命令编译 php_fpm,例如: ``` make ``` 10. 将编译完成的 lighttpd 和 php_fpm 拷贝到目标平台上。 以上就是交叉编译 lighttpd 和 php_fpm 的步骤,需要注意的是,编译选项需要根据实际情况进行调整,例如根据目标平台选择合适的交叉编译工具链、选择需要支持的模块等。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值