当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 2 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 编译用了boost的一个小程序的时候出现一个奇怪的错误
帖子发表于 : 2008-05-30 0:35 

注册: 2008-01-25 23:14
帖子: 1
送出感谢: 0 次
接收感谢: 0 次
cmakelua+boost 1.35
以下是cmakelua的脚本:
cmake.project('boostcmakelua',"CXX")
cmake.message('这是一个用Lua来编写使用boost的cmakelists.lua的例子。')
print("其实可以直接用Lua来输出的。")
cmake.include("FindBoost")
cmake.include_directories(Boost_INCLUDE_DIRS)
print(Boost_INCLUDE_DIRS)
cmake.link_directories(Boost_LIBRARY_DIRS)
print("找到boost在:",Boost_LIBRARY_DIRS)


cmake.link_libraries("bcl",
"libboost_thread.a",
"libpthread.a",
--"libstdc++.so",
"libc.so")

cmake.add_executable("bcl","main.cxx")


以下是出错信息:
linker@linkerhp:~/workspace/boostcmakelua$ make VERBOSE=1
/usr/local/bin/cmake -H/home/linker/workspace/boostcmakelua -B/home/linker/workspace/boostcmakelua --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start /home/linker/workspace/boostcmakelua/CMakeFiles /home/linker/workspace/boostcmakelua/CMakeFiles/progress.make
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/linker/workspace/boostcmakelua'
make -f CMakeFiles/bcl.dir/build.make CMakeFiles/bcl.dir/depend
make[2]: Entering directory `/home/linker/workspace/boostcmakelua'
cd /home/linker/workspace/boostcmakelua && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/linker/workspace/boostcmakelua /home/linker/workspace/boostcmakelua /home/linker/workspace/boostcmakelua /home/linker/workspace/boostcmakelua /home/linker/workspace/boostcmakelua/CMakeFiles/bcl.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/linker/workspace/boostcmakelua'
make -f CMakeFiles/bcl.dir/build.make CMakeFiles/bcl.dir/build
make[2]: Entering directory `/home/linker/workspace/boostcmakelua'
Linking CXX executable bcl
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/bcl.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC CMakeFiles/bcl.dir/main.cxx.o -o bcl -rdynamic -Wl,-Bstatic -lboost_thread -lpthread -Wl,-Bdynamic -lc
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libpthread.a(ptw-pause.o): In function `__pause_nocancel':
(.text+0x18): undefined reference to `__syscall_error'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libpthread.a(ptw-pause.o): In function `__pause_nocancel':
(.text+0x3b): undefined reference to `__syscall_error'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libpthread.a(init.o): In function `__pthread_initialize_minimal_internal':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nptl/init.c:247: undefined reference to `__libc_setup_tls'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nptl/init.c:385: undefined reference to `_dl_init_static_tls'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nptl/init.c:387: undefined reference to `_dl_wait_lookup_done'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libpthread.a(pthread_create.o): In function `allocate_stack':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nptl/allocatestack.c:418: undefined reference to `_dl_stack_flags'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nptl/allocatestack.c:560: undefined reference to `_dl_stack_flags'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libpthread.a(ptw-read.o): In function `__read_nocancel':
(.text+0x26): undefined reference to `__syscall_error'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libpthread.a(ptw-read.o): In function `__read_nocancel':
(.text+0x56): undefined reference to `__syscall_error'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libpthread.a(ptw-open.o): In function `__open_nocancel':
(.text+0x26): undefined reference to `__syscall_error'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libpthread.a(ptw-open.o): In function `__open_nocancel':
(.text+0x56): undefined reference to `__syscall_error'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libpthread.a(sigaction.o): In function `__libc_sigaction':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nptl/../sysdeps/unix/sysv/linux/i386/sigaction.c:83: undefined reference to `_dl_sysinfo_dso'
collect2: ld 返回 1
make[2]: *** [bcl] 错误 1
make[2]: Leaving directory `/home/linker/workspace/boostcmakelua'
make[1]: *** [CMakeFiles/bcl.dir/all] 错误 2
make[1]: Leaving directory `/home/linker/workspace/boostcmakelua'
make: *** [all] 错误 2

我的问题是:
undefined reference to `__syscall_error'

这个错误到底是怎么回事?
谢谢!


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2008-08-01 1:36 
头像

注册: 2007-03-13 11:23
帖子: 1343
送出感谢: 0 次
接收感谢: 0 次
cmake的lua绑定


_________________
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 2 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译