• AVR Freaks

GenericTypeDefs.h: error: syntax error before numeric constant

Author
vriendspookstem
New Member
  • Total Posts : 23
  • Reward points : 0
  • Joined: 2010/09/03 00:29:49
  • Location: 0
  • Status: offline
2010/09/07 04:23:53 (permalink)
0

GenericTypeDefs.h: error: syntax error before numeric constant

[SOLVED] - FOUND A #define TRUE and FALSE in obscure *.h file in my project folder

-----------------------
Hi I am receiving the following error with the GenericTypeDefs.h file:
C:/Microchip Solutions/Microchip/Include/GenericTypeDefs.h:48: error: syntax error before numeric constant

and the line is:
typedef enum _BOOL { FALSE = 0, TRUE =1} BOOL;    // Undefined size

As this file gave errors initially through my HardwareProfile.h file, I removed everything and just included this file in my main file.
I guess its due to the FALSE and TRUE variables?  I had my own #defines for TRUE and FALSE, but removed them and still no effect.

I have included the C:\Microchip Solutions\Microchip\Include in my 'Include Search Path" for the project.
Anyone else recognise this issue or can guide me in the right direction?
Thanks,
Gerrit
------------------------------

post edited by vriendspookstem - 2010/09/07 04:35:19
#1

3 Replies Related Threads

    Sqwale
    Starting Member
    • Total Posts : 83
    • Reward points : 0
    • Joined: 2011/01/14 09:24:25
    • Location: United Kingdom
    • Status: offline
    Re:GenericTypeDefs.h: error: syntax error before numeric constant 2011/01/14 09:28:24 (permalink)
    0
    I have the exact same Problem, I am using CCS (PCW) compiler are you using the same compiler or are you using MPLab IDE?
    #2
    Sqwale
    Starting Member
    • Total Posts : 83
    • Reward points : 0
    • Joined: 2011/01/14 09:24:25
    • Location: United Kingdom
    • Status: offline
    Re:GenericTypeDefs.h: error: syntax error before numeric constant 2011/01/14 11:02:04 (permalink)
    0
    I have a similar problem however your solution doesn't extend to my project. Is there another possible solution you came accross?
    #3
    BangingMyHead
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2008/11/10 05:52:53
    • Location: 0
    • Status: offline
    Re:GenericTypeDefs.h: error: syntax error before numeric constant 2012/04/04 07:50:24 (permalink)
    0
    I too am getting the same error.
    Using mplabc30/v3.31
    PIC24FV32KA304
    Bare bones project - just main() 
    As soon as i 
    #include <uart.h>
    i get 
    c:/program files/microchip/mplabc30/v3.31/bin/bin/../../support/peripheral_24F/GenericTypeDefs.h:64: error: syntax error before numeric constant

    if i remove the usart include, compiles fine.

    What is going on with the mchip libraries!
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5