Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

library not found for -lrt with QtCreator [mac os]

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

like image 492
Houssem Avatar asked Oct 01 '09 17:10

Houssem


People also ask

Does Qt work on macOS?

Instead, macOS uses its own native windowing system that is accessible through the Cocoa API. To download and install Qt for macOS, follow the instructions on the Getting Started with Qt page. To build Qt from source, see Qt for macOS - Building from Source.


1 Answers

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.

like image 58
asveikau Avatar answered Sep 24 '22 22:09

asveikau