Linking

Ian Chapman <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.user
Message-ID <[email protected]>
Hi all,
     My Makefile produces all the dot.o files from the dot.c files with 
a few warnings.  However the link stage fails to find the functions 
called by main.c that are specified in the dot.h and defined in the 
dot.c files and by then should be in dot.o files.
Makefile
CC=msp430-gcc
CFLAGS=-Os -Wall -g -mmcu=msp430f5438a
main : main.o bluetooth.o comm.o characters.o output.o
     $(CC) $(CFLAGS) main.c -o main.elf
main.o : main.c main.h
     $(CC) $(CFLAGS) -c main.c
etc

Result
msp430-gcc -Os -Wall -g -mmcu=msp430f5438a main.c -o main.elf
/tmp/ccx0kuof.o: In function `main':
/home/stan/msp430/TDU/main.c:202: undefined reference to `vEnterCommandMode'
/home/stan/msp430/TDU/main.c:203: undefined reference to `vSendCommand'
collect2: ld returned 1 exit status
make: *** [main] Error 1

     I guess I'm missing a flag to indicate that the dot.o files are in 
the working directory but that should be the gcc default.  Any ideas?  Ian.


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.