写的makefile适用于32位,但是放到64位机器上make就有问题。

需要在makefile中gcc -o。。。。的结尾加上-pthread,例如:

bloomfilter.o: bloomfilter.c bloomfilter.h hash.h
        gcc -o bloomfilter.o -Wall -pedantic -ansi -c bloomfilter.c -g -pthread

即可。

[解答]对‘’未定义的引用 collect2: 错误: ld 返回 1的更多相关文章

  1. gcc/g++ 编译时出现:“对’xxxx’未定义的引用,collect2: error: ld returned 1 exit status” 的错误

    出现的问题: 在使用 make 编译实现一个程序时,出现了下面的错误.查看程序源文件所在的目录时发现程序已经完成了编译,并生成了 list_repo.o 的文件,说明是在程序链接生成可执行文件时发生了 ...

  2. [转]c++使用thread类时编译出错,对‘pthread_create’未定义的引用

    转载地址:https://blog.csdn.net/wuhui20091515/article/details/52531202 例子1 #include <iostream> #inc ...

  3. 编译lua5.3.2报错提示libreadline.so存在未定义的引用解决方法

    从官网上下载5.3.2的源码后,make linux进行编译,提示报错: gcc -std=gnu99 -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline ...

  4. 多线程编程-pthread 未定义的引用

    多线程编程时用到函数库 pthread.h ,但是该函数库不是linux默认的函数库,所以编译c文件时,需要在目标代码文件后加上 -lpthread参数. 1.未加上 -lpthread 编译时,报错 ...

  5. 对‘TIFFReadDirectory@LIBTIFF_4.0’未定义的引用-------------- 解决办法

    ABLE_DEPRECATED' is defined [-Winvalid-pch] //usr/lib/libvtkIO.so.5.10:对‘TIFFReadDirectory@LIBTIFF_4 ...

  6. Ubuntu gcc错误:对'log'等函数未定义的引用

    Ubuntu gcc错误:对'log'等函数未定义的引用 a.c #include <stdio.h>#include <math.h>int main(){    float ...

  7. C语言中未定义的引用错误

    1.错误描述: /tmp/ccAu32Cb.o:在函数‘main’中:static.c:(.text+0x2d):对‘print_value’未定义的引用 2.通过对错误内容分析,我在编写程序时,ma ...

  8. gcc编译时对'xxxx'未定义的引用问题

    gcc编译时对’xxxx’未定义的引用问题 gcc编译时对’xxxx’未定义的引用问题 原因 解决办法 gcc 依赖顺序问题 在使用gcc编译的时候有时候会碰到这样的问题,编译为.o(obj) 文件没 ...

  9. (原)编译caffe时提示未定义的引用(undefined reference to)

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/5864715.html 参考网址: https://github.com/BVLC/caffe/issu ...

随机推荐

  1. ZOJ --- 3516 Tree of Three

    Tree of Three Time Limit: 2 Seconds      Memory Limit: 65536 KB Now we have a tree and some queries ...

  2. Exists与In效率分析

    A: In:是把外表和内表做Hash 连接,而exists 是对外表作loop 循环,每次loop循环再对内表进行查询. 当查询两个表的大小相当时,用In 和 exists差别不大. 如果两个表中一个 ...

  3. Oracle错误

    System.Data.OracleClient 需要 Oracle 客户端软件 8.1.7 或更高版本 这个是我页面报的错误,请帮解答 在错误出现的时候我第一时间现在了一个oracle客户端软件,然 ...

  4. ARM学习日记

    2012-05-15 1.ARM开发板环境的搭建,nor启动,通过suppervivi,下载vivi---下载Kernel----下载文件系统,然后Nandflash启动即可. 2.在/etc/ini ...

  5. linux下在多个文件夹中查找指定字符串的命令

    例如,想要在当前文件夹下的多个.c或者.txt文件中查找“shutdown”字符串, 可以使用“grep shutdown ./*.c”或“grep shutdown ./*.txt”即可 使用fin ...

  6. YII 小模块功能

    //1,使用updateCounters()来更新计数器字段. Book::model()->updateCounters(array('download_count'=>1),':id= ...

  7. 安装Office时出现windows installer服务不能更新一个或多个受保护的windows文件错误的解决方法

    今天在Windows XP上安装Microsoft Office 2010时,总是遇到“Windows Installer服务不能更新一个或多个受保护的windows文件,安装失败,正在回滚更改”提示 ...

  8. SSM拦截器应用

    1.创建工具包 2.编写拦截器业务逻辑类容(在此为验证登录效果) @Override public void doFilter(ServletRequest req, ServletResponse ...

  9. ASP.NET MVC- Controllers and Routing- Routing

    二.Creating Custom Routes In this tutorial, you learn how to  add a custom route to an ASP.NET MVC ap ...

  10. div+css的兼容性问题和解决方法

    1. 默认的内外边距不同 问题: 各个浏览器默认的内外边距不同 解决: *{margin:0;padding:0;}   2. 水平居中的问题 问题: 设置 text-align: center    ...