Hello,
I have recently started using MSPGCC (4.4.3) and I'm new to this list.
I facing difficulties with defined constants and getting "error:
expected ‘)’ before ‘;’ token" error.
I tried same code on gcc (x86) without the makefile and it compiles fine.
If I replace test (OUTPUT); with test (1); it compiles fine also.
Would could I be doing wrong?
Any help would be appreciated.
Thanks.
-------main.c--------------
#include <io.h>
#include <string.h>
#define OUTPUT 1;
#define INPUT 0;
void test(int data) {
data=0; //do something
}
void main (void) {
test (OUTPUT);
}
----------------------------
------Makefile---------
CC=msp430-gcc
CFLAGS=-Os -Wall -g -mmcu=msp430x2012
OBJS=main.o
all: $(OBJS)
$(CC) $(CFLAGS) -o main.elf $(OBJS)
%.o: %.c
$(CC) $(CFLAGS) -c $<
clean:
rm -fr main.elf $(OBJS)
------------------------------
-----error--------
msp430-gcc -Os -Wall -g -mmcu=msp430x2012 -c main.c
main.c:11: warning: return type of ‘main’ is not ‘int’
main.c: In function ‘main’:
main.c:12: error: expected ‘)’ before ‘;’ token
make: *** [main.o] Error 1
--------------------
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users