简体   繁体   中英

Qt - Cannot use external library for cross compiling

I follow this document Cross Compile Qt - Raspberry , and it works completly. I can cross compile simple application from qt creator. Now i want to use external libary ( ID3lib ). But it gets error when build project

/home/shymaxtic/Documents/FPT/Hihi/ID3tag/lib/libid3.so: error: error adding symbols: File format not recognized.

Can anyone help me?

Like Kuba Ober pointed, in order to include on you board a external library, you need to cross compile it, just like you do for your application.

Depending on the size of the library, you can either integrate it in your Qt project by creating a top level SUBDIR project, or simply cross-compile it manually, and provide the path to the cross-compiled library like you did here with LIBS += -L<path> -l<library>

When cross compiling, make sure to use the toolchain specific for your board (you already have it for Qt), and not the gcc/g++ of your desktop distribution

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM