Thank you, that got me further (and yes I did need to put the srandomdev fix in) and now I'm looking at another compile error...
Seems that the hypot function does not exist in my math.h libraries...I presume.
peter@peter-mini-CNC:~/Code$ make plt2g
cc -g -O0 plt2g.c -o plt2g
/tmp/ccn6ddff.o: In function `sort_seg':
/home/peter/Code/plt2g.c:340: undefined reference to `hypot'
/home/peter/Code/plt2g.c:348: undefined reference to `hypot'
/home/peter/Code/plt2g.c:354: undefined reference to `hypot'
/tmp/ccn6ddff.o: In function `draw_vectors':
/home/peter/Code/plt2g.c:539: undefined reference to `hypot'
/home/peter/Code/plt2g.c:570: undefined reference to `hypot'
/tmp/ccn6ddff.o:/home/peter/Code/plt2g.c:630: more undefined references to `hypot' follow
/tmp/ccn6ddff.o: In function `do_file':
/home/peter/Code/plt2g.c:1210: undefined reference to `emit_gcode'
collect2: ld returned 1 exit status
make: *** [plt2g] Error 1
peter@peter-mini-CNC:~/Code$
I created a simple "result=sqrt(x*x+y*y)" substitute function that seems to satisfy that requirement but now a call to "emit_gcode(j) fails since emit_gcode is not defined anywhere., though there is a prototype for it in plt2g.h
You can probably tell my coding is very rusty... |