Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » AVR-GCC
  • » [avr-gcc-list] Compilation fails because of SIGNAL redefinition [RSS Feed]

#1 Nov. 25, 2005 00:15:29

Przemek U.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Compilation fails because of SIGNAL redefinition


Hey,

I have made changes to my code to make it look more like a program less
like a hack, and believe or not it fails to compile now :>

when I execute
robo_avr]$ avr-gcc -g -mmcu=atmega8535 -Wall -Wstrict-
prototypes -Os -I /usr/local/avr/avr/include -
I /usr/local/avr/avr/include/avr -I ./inc -c -o src/servo.o
src/servo.c


src/servo.c:131: error: redefinition of 'SIGNAL'
src/servo.c:50: error: previous definition of 'SIGNAL' was here


>From servo.c (which I am trying to compile)
line 131: SIGNAL(SIG_OUTPUT_COMPARE2) { ... }
line 50: SIGNAL(SIG_OVERFLOW2) { ... }

I would image, that SIGNAL macro/define will get preprocessed before
compilation starts, or do I have to pass some magic cflag to gcc?

I am using avr-gcc (GCC) 3.4.4 on Linux

P




----------------------------------------------------------------------
Kobiece strony... >>>http://kobieta.interia.pl/_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#2 Nov. 25, 2005 06:23:51

Joerg W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Compilation fails because of SIGNAL redefinition


wrote:

> You're probably just forgetting to include interrupt.h.
>
> Add to the beggining of your program:
>
> #include <avr/interrupt.h>

As well as <avr/signal.h> (no longer needed in avr-libc 1.4).
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTLhttp://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#3 Nov. 26, 2005 13:33:27

Przemek U.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Compilation fails because of SIGNAL redefinition


That was it. I forgot to include signal.h
Thanks guys!

P

On Fri, 2005-11-25 at 03:07 +0000, wrote:
> Quoting Przemek Urbanski <>:
>
> > Hey,
> >
> > I have made changes to my code to make it look more like a program less
> > like a hack, and believe or not it fails to compile now :>
> >
> > when I execute
> > robo_avr]$ avr-gcc -g -mmcu=atmega8535 -Wall -Wstrict-
> > prototypes -Os -I /usr/local/avr/avr/include -
> > I /usr/local/avr/avr/include/avr -I ./inc -c -o src/servo.o
> > src/servo.c
> >
> >
> > src/servo.c:131: error: redefinition of 'SIGNAL'
> > src/servo.c:50: error: previous definition of 'SIGNAL' was here
>
> You're probably just forgetting to include interrupt.h.
>
> Add to the beggining of your program:
>
> #include <avr/interrupt.h>
>
> I hope this helps,
>


----------------------------------------------------------------------
Szukasz pracy? Szukamy pracownikow: projektanta serwisow, webmasterow,
specjalisty ds. badan, promotion managera, administratorow baz danych,
programistow Windows i wielu innych! >>>http://link.interia.pl/f18e6_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

  • Root
  • » AVR-GCC
  • » [avr-gcc-list] Compilation fails because of SIGNAL redefinition [RSS Feed]

Board footer

Moderator control

Enjoy the 27th of April
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support