TheNextLVL / wiringPi

UNOFICIAL WiringPi library for RPi 64bit OS
GNU Lesser General Public License v3.0
12 stars 3 forks source link

digitalWrite(pttPin,LOW); returns error undefined reference to `digitalRead' #3

Open UgoPoddine opened 2 years ago

UgoPoddine commented 2 years ago

Hi Adolfo,

thank-you for the porting of WiringPI in ARM64 envirnment. The basic use runs very well. Unfortunately I'm, finding an issue in compiling a small C++ daemon that performs very basic WiringPI activity (e.g. setting GPIO....) The 32bit version runs well, buy on the ARM64 system the same compiled version can not be executed due to ELF64 problem. I have tryed to recompile in the 64bit environment, bur the compilation returns error undefined reference to `digitalRead'. You porting has been installed on a PI3+ usind the .deb file.

Ant help appreciated Best regards Ugo

PS : full compilation log here below 👍

g++ -Wall pttdemonint.cpp -o pttdemon /usr/bin/ld: /tmp/ccXrsHue.o: in function RTS2PTT()': pttdemonint.cpp:(.text+0xc): undefined reference todigitalRead' /usr/bin/ld: pttdemonint.cpp:(.text+0x44): undefined reference to digitalWrite' /usr/bin/ld: pttdemonint.cpp:(.text+0x68): undefined reference todigitalWrite' /usr/bin/ld: /tmp/ccXrsHue.o: in function main': pttdemonint.cpp:(.text+0x80): undefined reference towiringPiSetup' /usr/bin/ld: pttdemonint.cpp:(.text+0x94): undefined reference to pinMode' /usr/bin/ld: pttdemonint.cpp:(.text+0xa8): undefined reference todigitalWrite' /usr/bin/ld: pttdemonint.cpp:(.text+0xbc): undefined reference to wiringPiISR' /usr/bin/ld: pttdemonint.cpp:(.text+0xc8): undefined reference topinModeAlt' collect2: error: ld returned 1 exit status