在使用Eclipse IDE使用Xively C Library在Beaglebone Black上为Ubuntu进行交叉编译时,我遇到了这个错误:
**** Build of configuration Debug for project Test ****
make all
Building file: ../src/Test.cpp
Invoking: GCC C++ Compiler
arm-linux-gnueabi-g++ -I/usr/arm-linux-gnueabi/include/c++/4.7.3 -I/home/nishant/libxively/src/libxively -I/usr/arm-linux-gnueabi/include/c++/4.7.3/bits -I/usr/arm-linux-gnueabi/include/c++/4.7.3/ext -I/usr/arm-linux-gnueabi/include/c++/4.7.3/arm-linux-gnueabi -I/usr/arm-linux-gnueabi/include/c++/4.7.3/backward -I/usr/arm-linux-gnueabi/include/c++/4.7.3/decimal -includexively.h -includexi_helpers.h -includexi_err.h -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Test.d" -MT"src/Test.d" -o "src/Test.o" "../src/Test.cpp"
Finished building: ../src/Test.cpp
Building target: Test
Invoking: GCC C++ Linker
arm-linux-gnueabi-g++ -L/home/nishant/workspace/Test/src -L/usr/arm-linux-gnueabi/lib -o "Test" ./src/Test.o -lxively
**/home/nishant/workspace/Test/src/libxively.a: could not read symbols: File format not recognized
collect2: error: ld returned 1 exit status
make: *** [Test] Error 1**
**** Build Finished ****
我认为问题与此有关:
答案 0 :(得分:0)
/home/nishant/workspace/Test/src/libxively.a采用不同的格式(可能是x86)。确保使用交叉编译器构建libxively。 您可能会遇到库依赖项问题,在这种情况下,构建bbk而不是交叉编译更简单。