undefined reference to `nids_init'
今天晚上编译一个libnids方面的程序。头文件包含了"libnids.h"。但是编译的时候还是出错。如下:
tmp/ccnCpNW6.o: In function `main':
sample.c:(.text+0x331): undefined reference to `nids_init'
sample.c:(.text+0x33d): undefined reference to `nids_register_tcp'
sample.c:(.text+0x342): undefined reference to `nids_run'
collect2: ld returned 1 exit status
后来查了下。原来是我编译的方式不对。
libnids库编译的时候需要pcap和net库,所以编译参数不对
应该为 gcc -g -o test test.c -lnids -lpcap -lnet。
成功。
undefined reference to `nids_init'相关推荐
- undefined reference to 'pthread_create'问题解决(转)
undefined reference to 'pthread_create' undefined reference to 'pthread_join' 问题原因: pthread 库不是 ...
- undefined reference to `libiconv_open 无法编译PHP libiconv
原文:http://hi.baidu.com/ostech/blog/item/a63f9b0dabed1ae7ab6457d0.html ./configure --with-mysql=/back ...
- 【Qt】error: undefined reference to `vtable for MainWindow‘
1.问题描述 在写一个demo时,想尽量简单,就把MainWindow类的定义和实现都写在main.cpp中,结果编译时报错: main.cpp:-1: error: undefined refere ...
- 【Qt】报错error: undefined reference to `vtable for的解决方法
1.问题描述 编译Qt程序时,在某个类构造函数定义处报错: error: undefined reference to `vtable for 2.原因分析 导致错误信息的原因是:子类没有实现父类的纯 ...
- 【ffmpeg】编译时报错:error: undefined reference to `av...
1.问题描述 昨天使用ffmpeg库编译demo一切正常,今天再次链接ffmpeg库时报了一堆错误: error: undefined reference to `av_frame_alloc()' ...
- undefined reference to android log print,undefined reference to '__android_log_print'
场景:undefined reference to `android_log_print' undefined reference to `__android_log_print' 原因:没有加入支持 ...
- undefined reference to 'WinMain@16' 的四种情况
undefined reference to 'WinMain@16' 意思为提示找不到 WinMain 函数,WinMain是windows程序的入口函数,有几种可能: int main() 写成了 ...
- 报错解决:undefined reference to `snappy::MaxCompressedLength(unsigned long)'
下午在编译phxpaxos的样例时报错了,报错如下: g++ echo_sm.o echo_server.o main.o -o phxecho -L/home/zhang/phxpaxos/.lib ...
- 重新编译php又出错了。undefined reference to `php_xx
2019独角兽企业重金招聘Python工程师标准>>> main/rfc1867.lo(.text+0x1c): In function `php_mb_flush_gpc_vari ...
最新文章
- 查看照片的指定位置的像素点值,并在照片中绘制一条指定像素颜色的线段
- LeetCode 1944. 队列中可以看到的人数(单调栈)
- js设计一个带开关的时钟_数电题:三个按键一个灯
- mysql 的节点组是什么_什么是MySQL集群
- 信息学奥赛一本通(1078:求分数序列和)
- 【转载 待读】卷积神经网络
- php ob缓存原理介绍
- jquery-file-upload限制文件上传大小和文件个数
- cocos2d-x性能优化的那些事
- 爆强!将 exe 文件反编译成 Python 脚本!
- oracle 数值加减乘除
- 小程序 Rsa加密
- java excel poi 包_用java poi包读取Excel单元格
- 装系统后恢复U盘容量
- php-fpm端口占用无法启动
- 如何看待 Google 最新的系统 Fuchsia?
- 27个强大的PDF在线工具,完全免费!
- Matlab使用串口进行数据通信
- vue部分面试题分享
- matlab结果中有虚数,Matlab数值积分结果是虚数