TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: JESPER KAAS
from: THE NATURAL PHILOSOPHER
date: 2020-03-10 13:21:00
subject: Re: Problem with wiringPi

On 10/03/2020 11:37, Jesper Kaas wrote:
> On Tue, 10 Mar 2020 12:20:16 +0100, Jesper Kaas
>  wrote:
>
>>> Are these messages happening at compile time or at link time?
>>>
>>> I suspect its not that these are not defined in the header but that you
>>> aren't linking in the wiringPi library at link time...
>   I am getting closer now:
> Did a new build of wiringPi and saw the following message in the
> terminal:
> NOTE: To compile programs with wiringPi, you need to add:
>      -lwiringPi
>    to your compile line(s) To use the Gertboard, MaxDetect, etc.
>    code (the devLib), you need to also add:
>      -lwiringPiDev
>    to your compile line(s).
>
> So I added the text "-lwiringPi" to the compile and build commands in
> Geany. Now I only get the following error message when running a
> build:
> g++ -wall -o -lwiringPi "blink" "blink.c" (in directory:
> /home/pi/wiringpi/examples)
> g++: error: blink: no such file or directory
> Compilation failed.
> There is a file blink.c in directory home/pi/wiringpi/examples, so
> something else is nagging Geany, but what?
>
> Best regards.
>
wrong order

.... -o blink -lwiringpi blink.c

--
     “I know that most men, including those at ease with problems of the
greatest complexity, can seldom accept even the simplest and most
obvious truth if it be such as would oblige them to admit the falsity of
conclusions which they have delighted in explaining to colleagues, which
they have proudly taught to others, and which they have woven, thread by
thread, into the fabric of their lives.”

     ― Leo Tolstoy

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.