Troubleshooting

RS485_Wind_Speed_Transmitter_SKU_SEN0483

userHead Jimmy.Barnett 2022-11-05 11:18:37 1900 Views5 Replies

I am unable to compile the code for the raspberry pi 2 so that I may test with this unit.

admin@raspberrypi:/RS485_Wind_Speed_Transmitter $ sudo gcc -Wall -lwiringPi -o Wind_Speed *.c
/usr/bin/ld: /tmp/ccfI7bSF.o:(.bss+0x0): multiple definition of `fd'; /tmp/cc3JNLfF.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/cc3JNLfF.o: in function `main':
main.c:(.text+0x24): undefined reference to `delay'
/usr/bin/ld: main.c:(.text+0x88): undefined reference to `delay'
/usr/bin/ld: /tmp/ccfI7bSF.o: in function `ModifyAddress':
RS485_Wind_Speed_Transmitter.c:(.text+0x158): undefined reference to `millis'
/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x1b0): undefined reference to `millis'
/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x1c8): undefined reference to `millis'
/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x1f8): undefined reference to `millis'
/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x210): undefined reference to `serialDataAvail'
/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x224): undefined reference to `delay'
/usr/bin/ld: /tmp/ccfI7bSF.o: in function `Init':
RS485_Wind_Speed_Transmitter.c:(.text+0x3b8): undefined reference to `serialOpen'
/usr/bin/ld: /tmp/ccfI7bSF.o: in function `readWindSpeed':
RS485_Wind_Speed_Transmitter.c:(.text+0x478): undefined reference to `millis'
/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x4c8): undefined reference to `millis'
/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x4ec): undefined reference to `millis'
/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x51c): undefined reference to `millis'
/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x534): undefined reference to `serialDataAvail'
/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x548): undefined reference to `delay'
collect2: error: ld returned 1 exit status
 

Can anyone assist?

 

2023-06-04 03:44:04

Hello, I also encounter the same error when compiling. I'll show you what I've done in case you detect any problem; I am using the Raspberry Pi 3 B v1.2. Thank you:isidr@rb3:/tmp $ lssystemd-private-ff3d6d196cfb4cf59ddb91babd754546-colord.service-Zf1A9gsystemd-private-ff3d6d196cfb4cf59ddb91babd754546-ModemManager.service-ao7Kshsystemd-private-ff3d6d196cfb4cf59ddb91babd754546-systemd-logind.service-uZ44Sfsystemd-private-ff3d6d196cfb4cf59ddb91babd754546-systemd-timesyncd.service-0oAcvfwiringpi-latest.debisidr@rb3:/tmp $ sudo dpkg -i wiringpi-latest.deb(Reading database ... 106579 files and directories currently installed.)Preparing to unpack wiringpi-latest.deb ...Unpacking wiringpi (2.52) over (2.52) ...Setting up wiringpi (2.52) ...Processing triggers for man-db (2.9.4-2) ...isidr@rb3:/tmp $ cd /homeisidr@rb3:/home $ lsisidr  rpi-first-boot-wizard  RS485_Wind_Speed_Transmitterisidr@rb3:/home $ cd RS485_Wind_Speed_Transmitter/isidr@rb3:/home/RS485_Wind_Speed_Transmitter $ lsmain.c  RS485_Wind_Speed_Transmitter.c  RS485_Wind_Speed_Transmitter.hisidr@rb3:/home/RS485_Wind_Speed_Transmitter $ gcc -Wall -lwiringPi -o Wind_Speed *.c/usr/bin/ld: cannot open output file Wind_Speed: Permission deniedcollect2: error: ld returned 1 exit statusisidr@rb3:/home/RS485_Wind_Speed_Transmitter $ sudo gcc -Wall -lwiringPi -o Wind_Speed *.c/usr/bin/ld: /tmp/ccU4SCvZ.o:(.bss+0x0): multiple definition of `fd'; /tmp/ccwTPk71.o:(.bss+0x0): first defined here/usr/bin/ld: /tmp/ccwTPk71.o: in function `main':main.c:(.text+0x24): undefined reference to `delay'/usr/bin/ld: main.c:(.text+0x88): undefined reference to `delay'/usr/bin/ld: /tmp/ccU4SCvZ.o: in function `ModifyAddress':RS485_Wind_Speed_Transmitter.c:(.text+0x158): undefined reference to `millis'/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x1b0): undefined reference to `millis'/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x1c8): undefined reference to `millis'/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x1f8): undefined reference to `millis'/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x210): undefined reference to `serialDataAvail'/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x224): undefined reference to `delay'/usr/bin/ld: /tmp/ccU4SCvZ.o: in function `Init':RS485_Wind_Speed_Transmitter.c:(.text+0x3b8): undefined reference to `serialOpen'/usr/bin/ld: /tmp/ccU4SCvZ.o: in function `readWindSpeed':RS485_Wind_Speed_Transmitter.c:(.text+0x478): undefined reference to `millis'/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x4c8): undefined reference to `millis'/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x4ec): undefined reference to `millis'/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x51c): undefined reference to `millis'/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x534): undefined reference to `serialDataAvail'/usr/bin/ld: RS485_Wind_Speed_Transmitter.c:(.text+0x548): undefined reference to `delay'collect2: error: ld returned 1 exit status

userHeadPic Isidro.Navarro
Isidro.Navarro wrote:

isidr@rb3:/home/RS485_Wind_Speed_Transmitter $ gpio -vgpio version: 2.52Copyright (c) 2012-2018 Gordon HendersonThis is free software with ABSOLUTELY NO WARRANTY.For details type: gpio -warranty

Raspberry Pi Details: Type: Pi 3, Revision: 02, Memory: 1024MB, Maker: Sony * Device tree is enabled. *--> Raspberry Pi 3 Model B Rev 1.2 * This Raspberry Pi supports user-level GPIO access. 

2023-06-04 03:48:45
1 Replies
2022-11-15 23:25:06

This problem may be caused by system compilation, please check: https://nkaushik.com/linux/undefined-reference-to-pow-error-fix/

userHeadPic jenna
2022-11-15 08:31:17

Hi Winster,

 

Yes libraries have been downloaded and followed the instructions however when it told me to compile thats when I get the errors above.

 

userHeadPic Jimmy.Barnett
2022-11-11 23:37:42

Hi, have you download the libraries?

userHeadPic Winster