PMunch / ratel

128 stars 4 forks source link

undefined reference to main #14

Closed blippy closed 2 years ago

blippy commented 2 years ago

In a directory called blinkr I have blinkr.nim and config.nims, which are as per the front page of the ratel repo.

I type ratel build, and get the response:

Hint: used config file '/home/pi/.choosenim/toolchains/nim-1.6.6/config/nim.cfg' [Conf]
Hint: used config file '/home/pi/.choosenim/toolchains/nim-1.6.6/config/config.nims' [Conf]
Hint: used config file '/home/pi/tmp/blinkr/config.nims' [Conf]
.....................................................................
----------------------------------
The current board: unor3
----------------------------------
....................
Hint:  [Link]
/usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'
collect2: error: ld returned 1 exit status
Error: execution of an external program failed: '/usr/bin/avr-gcc   -o /home/pi/tmp/blinkr/blinkr  /home/pi/.cache/nim/blinkr_r/stdlib_system.nim.c.o /home/pi/.cache/nim/blinkr_r/@m..@s..@s.nimble@spkgs@sratel-0.2.0@sboard@sserial.nim.c.o /home/pi/.cache/nim/blinkr_r/@mblinkr.nim.c.o  -mmcu=atmega328p -I. -DF_CPU=16000000UL -Os -ffunction-sections -fpack-struct -fshort-enums -flto -Wall -Wstrict-prototypes -Wl,--relax -Wl,--gc-sections -lm   '
vmops.nim(7)             exec
Error: unhandled exception: nim c -d:danger --os:any blinkr.nim [OSError]
PMunch commented 2 years ago

Ah yes, I made a tiny change in the repo so you need to update to 0.2.1. Just run nimble install ratel again