|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.31There 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
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.