Error Macro Names Must Be Identifiers Ifndef
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow error macro names must be identifiers c++ the company Business Learn more about hiring developers or posting ads with us Stack Overflow error macro names must be identifiers linux Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of command-line error macro names must be identifiers 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up error: macro names must be identifiers up vote 2 down vote favorite I keep getting the error "macro
Command Line 0 1 Error Macro Names Must Be Identifiers
names must be identifiers" in the following code, and I'm not sure why. I haven't violated any of the naming standards as far as I know. This is from my "dllist.h" file: #ifndef _DOUBLY_LINKED_LIST_ #define _DOUBLY_LINKED_LIST_ template
CommunitiesAVR FreaksAtmel SMART ARM-based MCUsInternet of ThingsCapacitive TouchProjectsVendorsWiki You are hereHome » Communities » AVR Freaks » Forums » Tools » Compilers and General Programming » Error: macro names must be identifiers macro names must be identifiers #define Main menu mobile Home Communities Forums Projects Vendors Wiki Search My summary Privacy
Macro Name Must Be An Identifier Xcode
Contact Site Use Terms Cookies Communities Forums Projects Vendors WIKI Error: macro names must be identifiers Log in or register
Ifdef 0 In C
to post comments Go To Last Post 6 posts / 0 new Author Message raphaelgomes Level: Rookie Joined: Fri. Feb 26, 2010 Posts: 22 View posts Location: Natal, Brazil #1 Posted by raphaelgomes: http://stackoverflow.com/questions/13793376/error-macro-names-must-be-identifiers Thu. Mar 11, 2010 - 12:06 PM Fivestar widget 12345Total votes: 0 I have looked it up on internet and all I can find about this error is that it happens when you use the #if directive with numbers instead of macros and your compiler does not support it, like: #if 0 ... #endif Used to prevent some part of the code to to be compiled. However, http://www.avrfreaks.net/forum/error-macro-names-must-be-identifiers my code has none of this, instead I use real-defined macros, like: #if defined(_FOO_) ... #endif I am curently using the latest WinAVR suite (AVR GCC, make, etc), and trying to compile a program using BitCloud and checking the _LEDS_ and _LCD_ macros, which have been working fine until yesterday, when this error started appearing just from nothing. What other programming flaws might cause this error? Tags:Tools, Compilers and General Programming Log in / register to post comments Top david.prentice Level: 10k+ Postman Joined: Sat. Feb 12, 2005 Posts: 25785 View posts Location: Wormshill, England #2 Posted by david.prentice: Thu. Mar 11, 2010 - 12:20 PM 12345Total votes: 0 There is nothing different between #if 0 and #if defined(_FOO_) The C pre-processor just evaluates the expression and processes or skips the lines until it comes to the #endif. When you have problems like this, it is generally easier to just look at the pre-processed output with make file.i There are silly syntactical differences #if defined(_FOO_) #if (defined(_FOO_)) #ifdef _FOO_ are all ok. but #ifdef (_FOO_) is not. David. Log in or register to post comments Top clawson Level: Moderator Joined: Mon. Jul 18, 2005 Posts: 83549 View posts L
All CPLDs » Configuration Program Storage Power PowerSoC Converters DDR Memory Termination All Devices » Intellectual Property What's New in must be IP Best in Class IP Nios II Processor Find IP Reference Designs Boards & Kits Development Kits Daughter Cards Cables & Adapters SoC System-on-Modules Design Software What's New Quartus Prime Software Altera SDK macro names must for OpenCL DSP Builder SoC Development Tools SoC EDS ARM DS-5 AE All Products Industry Solutions Automotive Broadcast Computer & Storage Consumer Industrial Medical Military, Aerospace & Gov Test & Measurement Wireless Wireline Technology Heterogeneous Integration Machine Learning Digital Signal Processing External Memory Security Transceivers Intelligent Vision & Video Internet of Things Partners Design Solutions Network COTS Board Partners EDA Partners End Market Partners Mathworks Partnership OpenCL Partners SoC Partners Training Partners System Design Journal Help and solutions for tomorrow's design.by Ron Wilson,Editor-in-Chief Design Solutions New to FPGAs Product Selector Design Store All Solutions
get tips & solutions from a community of 418,536 IT Pros & Developers. It's quick & easy. Need help on Macro P: n/a zaheer031 Hi All, I need to define a macro as follows #define VERSION "1.0" #ifdef (VERSION == "1.0") #endif main() { } I want to check the Version using macro . But the code compilation gives error " macro names must be identifiers" I know that #ifdef will work only for integers . Also I need this to be done before main. Need help for the same. Regards, Khan. Mar 5 '07 #1 Post Reply Share this Question 6 Replies P: n/a santosh za*******@gmail.com wrote: Hi All, I need to define a macro as follows #define VERSION "1.0" #ifdef (VERSION == "1.0") #endif main() { } I want to check the Version using macro . But the code compilation gives error " macro names must be identifiers" I know that #ifdef will work only for integers . Also I need this to be done before main. Need help for the same. Try: #define VERSION 1 #if VERSION == 1 /* ... */ #endif int main(void) { /* ... */ return 0; } Mar 5 '07 #2 P: n/a zaheer031 On Mar 5, 3:56 pm, "santosh"