To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3916
3915  |  3917
Subject: 
Errors compiling threads
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 4 Aug 2005 02:01:24 GMT
Viewed: 
7736 times
  
Hi all,
I am new to C programming but I was able to build the C programming/compiler
enviroment with cygwin and brickos 2.6.10 following the instructions at
http://brickos.sourceforge.net/docs/INSTALL-cygwin.html. Later I upgraded to
brickOS 0.9.0 and the compiler seems to be working fine most of the time. I am
learning legOS using Luis Villa's (and others) Extreme Mindstorms book. I was
able to compile and transmit code to the RCX brick successfully for all examples
in the book, except for Seeker.c, which uses several threads. The compiler
listed the following errors:

seeker.c:18: parse error before `driving_thread'
seeker.c:18: warning: type defaults to `int' in declaration of `driving_thread'
seeker.c:18: warning: data definition has no type or storage class
seeker.c:19: parse error before `bumper_thread'
seeker.c:19: warning: type defaults to `int' in declaration of `bumper_thread'
seeker.c:19: warning: data definition has no type or storage class
seeker.c:20: parse error before `light_thread'
seeker.c:20: warning: type defaults to `int' in declaration of `light_thread'
seeker.c:20: warning: data definition has no type or storage class
seeker.c: In function `basic_driver':
seeker.c:274: `sys_time' undeclared (first use in this function)
seeker.c:274: (Each undeclared identifier is reported only once
seeker.c:274: for each function it appears in.)
make: *** [seeker.o] Error 1

The source code for Seeker.c can be found at
http://www.apress.com/book/supplementDownload.html?bID=24&sID=262&APRESSESSID=0b20cba4e598d0fc6c88c770215bb6d1

I assume I have a problem with my compiler, but I can't figure out what it is.
Any help will be very welcomed!

Thanks a lot,
Marcelo



Message has 1 Reply:
  Re: Errors compiling threads
 
(...) I don't think it's a problem with the compiler. There have been changes to the BrickOS code over the years. I know the value sys_time has been replaced with the function Get_sys_up_time(). You should be able to add this line at the beginning (...) (19 years ago, 4-Aug-05, to lugnet.robotics.rcx.legos)

3 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR