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
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With