HTTP错误总结

[zyc@localhost connectSql]$ make
g++ -o insert_cgi insert_cgi.cpp comm.cpp -I/home/zyc/linux/myhttp/connectSql/../lib/include -L/home/zyc/linux/myhttp/connectSql/../lib/lib -lmysqlclient  -rpath=/usr/local/lib  
g++: unrecognized option '-rpath=/usr/local/lib'
/usr/bin/ld: warning: libssl.so.1.0.0, needed by /home/zyc/linux/myhttp/connectSql/../lib/lib/libmysqlclient.so, not found (try using -rpath or -rpath-link)
...
/home/zyc/linux/myhttp/connectSql/../lib/lib/libmysqlclient.so: undefined reference to `ERR_get_error_line_data'
collect2: ld returned 1 exit status
make: *** [insert_cgi] Error 1

解决方法:

[zyc@localhost connectSql]$ export LD_LIBRARY_PATH=/home/zyc/linux/myhttp/lib/lib

问题二:mysql连接不上:报糟糕握手

makefile 中库文件引入问题

问题三:

comm.h:6: error: expected constructor, destructor, or type conversion before ‘;’ token
insert_cgi.cpp: In functionint main()’:
insert_cgi.cpp:9: error: ‘mysql_insert’ was not declared in this scope
In file included from comm.cpp:2:
comm.h:6: error: expected constructor, destructor, or type conversion before ‘;’ token

解决:

源文件与头文件中函数声明与定义不匹配导致。

int mysql_insert(MYSQL* myfd,std::string &name,std::string &school);

忘记写函数返回类型导致。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值