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

C / C++ / MFC

 
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 
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 
Your compiler command lines looks a little bit weird regarding the double quotes (especially the first group with the trailing -I):
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"
When there are no spaces in the arguments, the quotes can be omitted:
arm-linux-gnueabihf-gcc -I/usr/local/include -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"
Note also that it is not necessary to specify library pathes and libraries when compiling only (option -c). These have to specified when linking (see below).

/usr/lib/../lib/libwiringPi.so: file not recognized: File format not recognized
You are linking with the shared library /usr/lib/libwiringPi.so. As far as I remember, the default WiringPi build will install the library into /usr/local/lib/. Check where the file in /usr/lib comes from and try to build after deleting (or renaming/moving) it. But before doing so fix your linker command line:
arm-linux-gnueabihf-gcc -o "ESA_SPI" ./src/ESA_SPI.o -lwiringPi -lrt -lpthead -lm -lcrypt
That is missing the additional library path and has a wrong pthread name (which does not care because GCC will detect the use of pthreads and link the library automatically so that it can be omitted):
arm-linux-gnueabihf-gcc -L/usr/local/lib -o "ESA_SPI" ./src/ESA_SPI.o -lwiringPi -lrt -lpthread -lm -lcrypt


Regarding the names libwiringPi.so and the linker command line option -lwiringPi:
With Linux, all library files names should begin with lib and have the extension .so (or .a for static libraries). You can optionally (but it is usual) pass the short name (without prefix and extension) to the GCC linker command line.
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 
GeneralRe: Clarification of Debug/Release mode Pin
leon de boer13-Sep-17 18:25
leon de boer13-Sep-17 18:25 
Questionbatch file quicksort algorithm Pin
wayne wu10-Sep-17 16:10
wayne wu10-Sep-17 16:10 
AnswerRe: batch file quicksort algorithm Pin
Richard MacCutchan10-Sep-17 19:24
mveRichard MacCutchan10-Sep-17 19:24 
AnswerRe: batch file quicksort algorithm Pin
CPallini11-Sep-17 2:22
mveCPallini11-Sep-17 2:22 
Questionelaborate the build instructions Pin
Member 125524089-Sep-17 13:05
Member 125524089-Sep-17 13:05 
AnswerRe: elaborate the build instructions Pin
Richard MacCutchan10-Sep-17 4:18
mveRichard MacCutchan10-Sep-17 4:18 

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.