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 / 3293
3292  |  3294
Subject: 
Re: brickos-0.2.6.10 error
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 3 Jun 2003 01:56:02 GMT
Viewed: 
3658 times
  
Scott,

You need to put a .depend file and Makefile inside the directory you are
compiling the programs in.  Just create a file with the extenstion  .depend and
put it into your programs directory. There dosn't need to be anything in the
file. When you use make, information needs to be written to this file. Don't put
the extension  .lx when you use make just simply

Scott Davis@Scott /brickos/programs
$ make motor

you might also want to rename the file something besides motor just as a
precaution.

  Make sure your Makefile is configured like the one below and change line 11 where it says   yourprogramnamehere.lx to the name of the file your trying to compile of course with   the .lx extension after it

Chaz



### ==========================================================================
###  $Id: Makefile,v 1.9 2002/10/23 17:42:44 stephmo Exp $
###  FILE: demo/c++/Makefile - make the C++ Language Demo Programs
###  brickOS - the independent LEGO Mindstorms OS
### --------------------------------------------------------------------------

# #LIBDIR#         ###   DO NOT REMOVE THIS LINE  ###
KERNEL = $(BRICKOS_ROOT)/boot/brickOS

PROGRAMS = \
yourprogramnamehere.lx

# extra dynamic sources
DOBJECTS=

include /brickos-0.2.6.10/Makefile.common
include /brickos-0.2.6.10/Makefile.user


all:: $(PROGRAMS)
@# nothing to do here but do it silently

.depend: *.[cC]
$(MAKEDEPEND) *.[cC] > .depend

depend:: .depend
@# nothing to do here but do it silently

#  NOTE: --format=1 is not supported on Linux ([ce]tags from emacs2[01]
packages)
#   please set in your own environment
tag:
-ctags *.[cC] $(BRICKOS_ROOT)/include/*.h $(BRICKOS_ROOT)/include/*/*.h
-etags *.[cC] $(BRICKOS_ROOT)/include/*.h $(BRICKOS_ROOT)/include/*/*.h

clean:
rm -f *.o *.dis *.dis2 *~ *.bak *.tgz *.s *.ds1 *.ds2 *.dmap *.dcoff
rm -f *.srec *.map *.coff

realclean: clean
rm -f *.lx .depend tags TAGS

.PHONY: all depend tag clean realclean

# depencencies
#
ifndef NODEPS
-include .depend
endif


### --------------------------------------------------------------------------
###                     End of FILE: demo/c++/Makefile
### ==========================================================================





In lugnet.robotics.rcx.legos, Scott Davis wrote:
I get this when ever I try to compile a program.

Scott Davis@Scott ~
$ cd /brickos/programs

Scott Davis@Scott /brickos/programs
$ dir
Makefile  motor.c

Scott Davis@Scott /brickos/programs
$ make motor.lx
Makefile:51: .depend: No such file or directory
/h8300-000821/H-i686-cygwin32/bin/h8300-hms-gcc -M -I/brickos/include -I/brickos
/include/lnp -I. -I/brickos/boot *.c > .depend
/h8300-000821/H-i686-cygwin32/bin/h8300-hms-gcc -O2 -fno-builtin -fomit-frame-po
inter -Wall -I/brickos/include -I/brickos/include/lnp -I. -I/brickos/boot  -c mo
tor.c -o motor.o
/h8300-000821/H-i686-cygwin32/bin/h8300-hms-ld -T ../boot/brickOS.lds -relax -L/
brickos/lib motor.o  -lc -lmint -lfloat -lc++ -o motor.dc1 --oformat coff-h8300
-Ttext 0xb000
/h8300-000821/H-i686-cygwin32/bin/h8300-hms-ld.exe: cannot find -lc
make: *** [motor.dc1] Error 1



I'm fairly sure that its not the program that is causing the error.

Here is the program:


#include <dmotor.h>
#include <unistd.h>

int main(int argc, char **argv)
{
   motor_a_dir(fwd);
   motor_a_speed(MAX_SPEED);
   motor_c_dir(fwd);
   motor_c_speed(MAX_SPEED);
   sleep(4);
   motor_a_dir(off);
   motor_c_dir(off);

   return 0;
}

If anyone could help me solve this I would greatly appreciate it.

Thanx
Scott

p.s.
I'm running windows xp pro and installed the prebuilt Hitachi package.



Message is in Reply To:
  brickos-0.2.6.10 error
 
I get this when ever I try to compile a program. Scott Davis@Scott ~ $ cd /brickos/programs Scott Davis@Scott /brickos/programs $ dir Makefile motor.c Scott Davis@Scott /brickos/programs $ make motor.lx Makefile:51: .depend: No such file or (...) (21 years ago, 2-Jun-03, to lugnet.robotics.rcx.legos)

2 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