Click here to Skip to main content
15,914,016 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Syntax error Pin
jschell26-Sep-17 6:15
jschell26-Sep-17 6:15 
GeneralRe: Syntax error Pin
Vaclav_28-Sep-17 7:10
Vaclav_28-Sep-17 7:10 
Questionuser name in system service Pin
john563220-Sep-17 19:31
john563220-Sep-17 19:31 
AnswerRe: user name in system service Pin
Jochen Arndt20-Sep-17 21:25
professionalJochen Arndt20-Sep-17 21:25 
QuestionTCF Eclipse users please reply Pin
Vaclav_20-Sep-17 13:39
Vaclav_20-Sep-17 13:39 
AnswerRe: TCF Eclipse users please reply Pin
Richard MacCutchan20-Sep-17 21:31
mveRichard MacCutchan20-Sep-17 21:31 
GeneralRe: TCF Eclipse users please reply Pin
Vaclav_21-Sep-17 13:06
Vaclav_21-Sep-17 13:06 
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 
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 
You have build wiringPi on the Pi using the build script. That will install the libraries to /usr/local/lib. Just have a look what is getting installed:
joe@raspi-cross:~/raspi/sysroot/usr/local/lib$ ls -l libw*
lrwxrwxrwx 1 joe joe    22 Jan 20  2016 libwiringPiDev.so -> libwiringPiDev.so.2.31
-rwxr-xr-x 1 joe joe 23232 Jan 20  2016 libwiringPiDev.so.2.31
lrwxrwxrwx 1 joe joe    19 Jan 20  2016 libwiringPi.so -> libwiringPi.so.2.31
-rwxr-xr-x 1 joe joe 55808 Jan 20  2016 libwiringPi.so.2.31
There are two shared libraries with the version as part of the name and two links that point to those. That is common with Linux. You can have different versions of a library which can be accessed using the full name and links pointing to a specific version (usually the most recent or the only version). This link name can be used instead (and then be shortened to be passed to the linker). So you can use in your case either -llibwiringPi.so.244 or -lwiringPi.

Once installed, you can build your program on the Pi and link it with the library.

But when using cross compilation, you have to make the libraries build on the Pi available to the cross setup. That can be done by copying the files or mounting the Pi file system (or parts of it) on the cross build system. The mounting can be done live (using network shares like NFS), using an image (e.g. by removing the SD card from the Pi and mounting it on the cross system), or some sync mechanism (which requires again network shares during synchronisation). In all cases you have to setup your cross system properly to use the mounted / copied files instead those of the host system itself (and use the cross tools instead of those from the host system).

You may also build wiringPi on the cross system. But then you have to use the cross tools and specify the install directory to be the mounted Pi system instead of the host system. But the Pi system has to be mounted anyway to link with all the ARM libraries instead of the x86 libraries of the host system.

As you can see from the above listing, I have mounted my Pi system at /home/joe/raspi/sysroot so that the cross build tools have access to all Pi files.

I don't know how you have setup your cross compilation system. But you must set the include and library paths to those on the mounted Pi root system using environment variables, specify them in the make scripts, or pass them on the GCC command line.
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 

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.