摘要:
sudo apt-get install libmysqlcppconn-dev 阅读全文
posted @ 2013-08-05 23:52
Monn
阅读(1221)
评论(0)
推荐(0)
摘要:
下面这个错误通常是因为链接选项里漏了-lrt,但有时发现即使加了-lrt仍出现这个问题,使用nm命令一直,会发现-lrt最终指向的文件 没有包含任何symbol,这个时候,可以找相应的静态库版本librt.a,看看它里面是否存在`clock_gettime'。/data1/mooon/run/lib/libsys.a(lock.o): In function `sys::CLock::timed_lock(unsigned int)':/data1/mooon/src/common_library/src/sys/./lock.cpp:101: undefined refere 阅读全文
posted @ 2013-08-05 15:31
Monn
阅读(1075)
评论(0)
推荐(0)
摘要:
//*********list class.h**********class tdate {private:int month;int day;int year;public:tdate();tdate(int t_month, int t_day, int t_year) {……}//tdate(const tdate &obj)//{}void display();};//********list class.c++:************#include "class.h"void tdate::display() {int main(){tdate t1( 阅读全文
posted @ 2013-08-05 14:36
Monn
阅读(589)
评论(0)
推荐(0)
摘要:
由于是Linux新手,所以现在才开始接触线程编程,照着GUN/Linux编程指南中的一个例子输入编译,结果出现如下错误:undefined reference to 'pthread_create'undefined reference to 'pthread_join'问题原因:pthread 库不是 Linux 系统默认的库,连接时需要使用静态库 libpthread.a,所以在使用pthread_create()创建线程,以及调用 pthread_atfork()函数建立fork处理程序时,需要链接该库。问题解决: 在编译中要加 -lpthread参数 g 阅读全文
posted @ 2013-08-05 12:10
Monn
阅读(511)
评论(0)
推荐(0)
浙公网安备 33010602011771号