Click here to Skip to main content
13,143,985 members (32,833 online)

C / C++ / MFC

 
PinnedHOW TO ANSWER A QUESTION Pin
Chris Maunder12-Jul-09 22:37
adminChris Maunder12-Jul-09 22:37 
PinnedHOW TO ASK A QUESTION Pin
Chris Maunder12-Feb-09 17:19
adminChris Maunder12-Feb-09 17:19 
QuestionSyntax error Pin
Vaclav_Sal4hrs 2mins ago
memberVaclav_Sal4hrs 2mins ago 
AnswerRe: Syntax error Pin
leon de boer3hrs 2mins ago
memberleon de boer3hrs 2mins ago 
GeneralRe: Syntax error Pin
Vaclav_Sal2hrs 28mins ago
memberVaclav_Sal2hrs 28mins ago 
Questionuser name in system service Pin
john563223hrs 59mins ago
memberjohn563223hrs 59mins ago 
AnswerRe: user name in system service Pin
Jochen Arndt22hrs 5mins ago
mvpJochen Arndt22hrs 5mins ago 
QuestionTCF Eclipse users please reply Pin
Vaclav_Sal20-Sep-17 13:39
memberVaclav_Sal20-Sep-17 13:39 
AnswerRe: TCF Eclipse users please reply Pin
Richard MacCutchan21hrs 59mins ago
protectorRichard MacCutchan21hrs 59mins ago 
GeneralRe: TCF Eclipse users please reply Pin
Vaclav_Sal6hrs 24mins ago
memberVaclav_Sal6hrs 24mins ago 
QuestionDoubly Linked List Pin
kinderu16-Sep-17 23:17
memberkinderu16-Sep-17 23:17 
AnswerRe: Doubly Linked List Pin
Richard MacCutchan17-Sep-17 1:49
protectorRichard MacCutchan17-Sep-17 1:49 
AnswerRe: Doubly Linked List Pin
leon de boer17-Sep-17 4:42
memberleon de boer17-Sep-17 4:42 
AnswerRe: Doubly Linked List Pin
Jochen Arndt17-Sep-17 21:45
mvpJochen Arndt17-Sep-17 21:45 
QuestionMessage Closed Pin
16-Sep-17 0:55
memberlindanwhite16-Sep-17 0:55 
QuestionSolution access internet by proxy server c++ Pin
Member 1241714613-Sep-17 19:22
memberMember 1241714613-Sep-17 19:22 
AnswerRe: Solution access internet by proxy server c++ Pin
jschell18-Sep-17 12:32
memberjschell18-Sep-17 12:32 
QuestionLinker error Pin
Vaclav_Sal12-Sep-17 15:53
memberVaclav_Sal12-Sep-17 15:53 
I am compiling C code for embedded application using TCF.
My "debug" compile is on x86 and works fine
My "release" on ARM (raspberry Pi ) compiles but won't link on ARM platform with identical compiler "Settings" options.



GCC on x86 - command “gcc”

with #include
#include "/usr/local/include/wiringPiSPI.h"


It compiles and link and run the code on x86 platform.



-I"-I/usr/local/include -L/usr/local/lib -lwiringPi" -O0 -g3 -Wall -c -fmessage-length=020:23:17 ****

Results of build

Incremental Build of configuration Debug for project ESA_SPI ****
make all
Building file: ../src/ESA_SPI.c
Invoking: Cross GCC Compiler
gcc -I"-I/usr/local/include -L/usr/local/lib -lwiringPi" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/ESA_SPI.d" -MT"src/ESA_SPI.o" -o "src/ESA_SPI.o" "../src/ESA_SPI.c"
Finished building: ../src/ESA_SPI.c

Building target: ESA_SPI
Invoking: Cross GCC Linker
gcc -o "ESA_SPI" ./src/ESA_SPI.o -lwiringPi -lrt -lpthread -lm -lcrypt
Finished building target: ESA_SPI


20:23:18 Build Finished (took 288ms)


<b>Here are the options and compiler / linker outputs on ARM platform.</b>



GCC on ARM with command arm-linux-gnueabihf-gcc

-I"-I/usr/local/include -L/usr/local/lib -lwiringPi" -O3 -Wall -c -fmessage-length=0


20:29:57 Build Finished (took 127ms)

20:29:57 **** Incremental Build of configuration Release for project ESA_SPI ****
make all
Building file: ../src/ESA_SPI.c
Invoking: Cross GCC Compiler
arm-linux-gnueabihf-gcc -I"-I/usr/local/include -L/usr/local/lib -lwiringPi" -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/ESA_SPI.d" -MT"src/ESA_SPI.o" -o "src/ESA_SPI.o" "../src/ESA_SPI.c"
Finished building: ../src/ESA_SPI.c

Building target: ESA_SPI
Invoking: Cross GCC Linker
arm-linux-gnueabihf-gcc -o "ESA_SPI" ./src/ESA_SPI.o -lwiringPi -lrt -lpthead -lm -lcrypt
/usr/lib/../lib/libwiringPi.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make: *** [ESA_SPI] Error 1

20:29:57 Build Finished (took 280ms)


My question is - where does the "<b>lib</b>wiringPi.so" error come from?

What needs to be optioned differently for the ARM compiler or do I have to modify something else?

Any help would be appreciated to resolve / give me a hit how to fix this.
Cheers
Vaclav
AnswerRe: Linker error Pin
Richard MacCutchan12-Sep-17 19:12
protectorRichard MacCutchan12-Sep-17 19:12 
AnswerRe: Linker error Pin
CPallini13-Sep-17 1:25
mvpCPallini13-Sep-17 1:25 
GeneralRe: Linker error Pin
Vaclav_Sal13-Sep-17 3:14
memberVaclav_Sal13-Sep-17 3:14 
GeneralRe: Linker error Pin
leon de boer13-Sep-17 4:02
memberleon de boer13-Sep-17 4:02 
GeneralRe: Linker error Pin
jschell13-Sep-17 8:23
memberjschell13-Sep-17 8:23 
AnswerRe: Linker error Pin
Jochen Arndt13-Sep-17 4:14
mvpJochen Arndt13-Sep-17 4:14 
GeneralRe: Linker error Pin
Vaclav_Sal13-Sep-17 9:05
memberVaclav_Sal13-Sep-17 9:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy |
Web01 | 2.8.170915.1 | Last Updated 21 Sep 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid