Chinaunix首页 | 论坛 | 博客
  • 博客访问: 179554
  • 博文数量: 28
  • 博客积分: 30
  • 博客等级: 民兵
  • 技术积分: 954
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-21 10:28
个人简介

站在巨人的肩膀是骗人的

文章分类

全部博文(28)

文章存档

2013年(28)

分类: LINUX

2013-05-08 13:03:24

对于很多开源库,他们一般都提供automake的编译发布形式,也就是三步曲:./configure && make && make install。
gdb hello-world如下:
  1. flushthink@gentoo64 ~/work/libevent-2.0.21-stable/sample $ gdb hello-world
  2. GNU gdb (Gentoo 7.5.1 p2) 7.5.1
  3. Copyright (C) 2012 Free Software Foundation, Inc.
  4. License GPLv3+: GNU GPL version 3 or later <
  5. This is free software: you are free to change and redistribute it.
  6. There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"
  7. and \"show warranty\" for details.
  8. This GDB was configured as \"x86_64-pc-linux-gnu\".
  9. For bug reporting instructions, please see:
  10. <
  11. \"/home/flushthink/work/libevent-2.0.21-stable/sample/hello-world\": not in executable format: File format not recognized
  12. (gdb)
file hello-world如下:
  1. flushthink@gentoo64 ~/work/libevent-2.0.21-stable/sample $ file hello-world
  2. hello-world: POSIX shell script, ASCII text executable
vim hello-world如下:
  1. flushthink@gentoo64 ~/work/libevent-2.0.21-stable/sample $ vim hello-world
  2. #! /bin/sh
  3. # hello-world - temporary wrapper script for .libs/hello-world
  4. # Generated by libtool (GNU libtool) 2.4.2
  5. #
  6. # The hello-world program cannot be directly executed until all the libtool
  7. # libraries that it depends on are installed.
  8. #
  9. # This wrapper script should never be moved out of the build directory.
  10. # If it is, it will not operate correctly.
  11. # Sed substitution that helps us do robust quoting. It backslashifies
  12. # metacharacters that are still active within double-quoted strings.
查automake在线文档发现:
-no-install Link an executable output-file that can't be installed and therefore doesn't need a wrapper script on systems that allow hardcoding of library paths. Useful if the program is only used in the build tree, e.g., for testing or generating other files.

得出了结论(可以./configure --help查看):
./configure --disable-libevent-install && make
这样就可以直接调试了。
阅读(3080) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~