Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: TCF Eclipse users please reply Pin
Richard MacCutchan21-Sep-17 21:00
mveRichard MacCutchan21-Sep-17 21:00 
QuestionDoubly Linked List Pin
kinderu16-Sep-17 23:17
kinderu16-Sep-17 23:17 
AnswerRe: Doubly Linked List Pin
Richard MacCutchan17-Sep-17 1:49
mveRichard MacCutchan17-Sep-17 1:49 
AnswerRe: Doubly Linked List Pin
leon de boer17-Sep-17 4:42
leon de boer17-Sep-17 4:42 
AnswerRe: Doubly Linked List Pin
Jochen Arndt17-Sep-17 21:45
professionalJochen Arndt17-Sep-17 21:45 
QuestionSolution access internet by proxy server c++ Pin
Con Cop Con13-Sep-17 19:22
Con Cop Con13-Sep-17 19:22 
AnswerRe: Solution access internet by proxy server c++ Pin
jschell18-Sep-17 12:32
jschell18-Sep-17 12:32 
QuestionLinker error Pin
Vaclav_12-Sep-17 15:53
Vaclav_12-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
mveRichard MacCutchan12-Sep-17 19:12 
AnswerRe: Linker error Pin
CPallini13-Sep-17 1:25
mveCPallini13-Sep-17 1:25 
GeneralRe: Linker error Pin
Vaclav_13-Sep-17 3:14
Vaclav_13-Sep-17 3:14 
GeneralRe: Linker error Pin
leon de boer13-Sep-17 4:02
leon de boer13-Sep-17 4:02 
GeneralRe: Linker error Pin
jschell13-Sep-17 8:23
jschell13-Sep-17 8:23 
AnswerRe: Linker error Pin
Jochen Arndt13-Sep-17 4:14
professionalJochen Arndt13-Sep-17 4:14 
GeneralRe: Linker error Pin
Vaclav_13-Sep-17 9:05
Vaclav_13-Sep-17 9:05 
GeneralRe: Linker error Pin
Jochen Arndt14-Sep-17 3:38
professionalJochen Arndt14-Sep-17 3:38 
GeneralRe: Linker error Pin
leon de boer15-Sep-17 22:21
leon de boer15-Sep-17 22:21 
GeneralRe: Linker error Pin
Vaclav_16-Sep-17 3:02
Vaclav_16-Sep-17 3:02 
GeneralRe: Linker error Pin
leon de boer16-Sep-17 3:16
leon de boer16-Sep-17 3:16 
QuestionClarification of Debug/Release mode Pin
ForNow11-Sep-17 2:24
ForNow11-Sep-17 2:24 
AnswerRe: Clarification of Debug/Release mode Pin
Jochen Arndt11-Sep-17 3:21
professionalJochen Arndt11-Sep-17 3:21 
AnswerRe: Clarification of Debug/Release mode Pin
leon de boer11-Sep-17 15:51
leon de boer11-Sep-17 15:51 
GeneralRe: Clarification of Debug/Release mode Pin
ForNow11-Sep-17 15:58
ForNow11-Sep-17 15:58 
GeneralRe: Clarification of Debug/Release mode Pin
leon de boer12-Sep-17 8:33
leon de boer12-Sep-17 8:33 
GeneralRe: Clarification of Debug/Release mode Pin
ForNow12-Sep-17 8:46
ForNow12-Sep-17 8:46 

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.