未找到库-lrt与QtCreator [MAC OS] [英] library not found for -lrt with QtCreator [mac os]
问题描述
我得到与QT它建立与选择一些麻烦-lrt
我使用MAC OS 10.6 Qt Creator的1.2.1,heeeeeeelp!
这是全力打造命令:
G ++ -headerpad_max_install_names -o
AMiningCoreTest main.o中tokenizer.o
DictionnaryToolBox.o mysql.o btree.o
BTreeDataTable.o tcaccess.o
-L /库/框架-L / usr / lib目录/ MySQL的-lmysqlclient -L在/ usr / local / lib目录/ -ltokyocabinet -lz -lbz2 -lrt -lpthread -lm -lc
块引用>和它结束
没有发现-lrt库:LD
collect2:劳工处返回1退出状态
块引用>解决方案为什么程序不需要librt?
我知道有些平台(Solaris想到)需要librt为可能在其他图书馆存在于您的操作系统的某些功能。 (sem_init()等人都是这样)
您可以尝试不-lrt链接,看看它是否工作。
i'm getting some troubles with QT it builds with option "-lrt"
i'm using mac os 10.6 with QT creator 1.2.1, heeeeeeelp !
this is the full build command :
g++ -headerpad_max_install_names -o AMiningCoreTest main.o tokenizer.o DictionnaryToolBox.o mysql.o btree.o BTreeDataTable.o tcaccess.o -L/Library/Frameworks -L/usr/lib/mysql -lmysqlclient -L/usr/local/lib/ -ltokyocabinet -lz -lbz2 -lrt -lpthread -lm -lc
and it ends with
ld: library not found for -lrt collect2: ld returned 1 exit status
解决方案Why does the program need librt?
I know that some platforms (Solaris comes to mind) require librt for some functions which might exist in other libraries in your OS. (sem_init() et al. are like this)
You might try to link without -lrt and see if it works.
这篇关于未找到库-lrt与QtCreator [MAC OS]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!