views:

699

answers:

2

hello, 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

+1  A: 

The linker cannot find librt which is probably the Posix real time extensions library. I don't think this is available on OSX. Googling gives this from Apple developer lists

Mark
A: 

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.

asveikau
Yes i've modified the build command to disable the -lrt library and it works :)thank you ^^
Houssem