修改工程下的.pro文件,添加如下内容其中添加的-lrt选项是由于利用交叉编译工具进行编译时,会提示undefined reference to ‘clock_gettime’,该问题是由于在链接时没有链接librt库导致的,添加该选项即可解决。图中lib所包含路径下的snmp库为分别使用gcc和arm交叉编译工具编译后生成的库文件。关于交叉编译库见《QT下...【阅读全文】
下面的代码演示利用glib库中的GQueue向队头、队尾添加数据和从队头、队尾删除数据的操作。 编译程序程序执行结果[plus@localhost c]$ ./g_queueThe queue is empty? YESAfter push first, second and third at head of queue:third second firstAfter push one, two and three at tail of queue:third second fi...【阅读全文】