Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't find error location "Line 0" :-(([b] error in line 0 - macro names must be identifier [\b])
Can't find error location "Line 0" :-( [message #1794297] Tue, 28 August 2018 14:45 Go to next message
David Fischer is currently offline David FischerFriend
Messages: 1
Registered: August 2018
Junior Member

Hello @ All !

I'm over to compile a example project for stm32f4 microcontrollers, written in C.
So, i'm not a C or uC newbie.
But this error message is not really helpful -
ok, "macro name must be a identifier" is explainable, this can be caused by a
definition.
But the problem is - i didn't get any information about the location of the error!
I have plenty source and header files in my project....
... the IDE give no information about the location ....
(i use atolic Studio for STM, version 9.01)

So, what should I do ?

Regards,
David Fischer
Re: Can't find error location "Line 0" :-( [message #1794319 is a reply to message #1794297] Wed, 29 August 2018 00:38 Go to previous message
David VavraFriend
Messages: 803
Registered: October 2012
Senior Member
You ARE using Eclipse and CDT, yes?

The IDE (i.e., CDT) only repeats what the compiler has given it.
Look at the compiler output in the build log.
The message may not have the format expected by CDT.
You may need to try compiling from a terminal window.

Break up the code to narrow your search.
Try compiling the first line then add lines until you get the error.
Yes, it is tedious.


some possible causes:
#define XXX aa // XXX already defined and it doesn't look like an identifier
// should be an "already defined" error but it depends on the preprocessor.

#ifdef id // OK
#ifdef 0  // BAD: should be an identifier but is a constant

// a partial preprocessor directive
#define #if // for example
#ifdef #if // another example

Google "macro name must be an identifier" for others.

Good luck.

[Updated on: Wed, 29 August 2018 00:47]

Report message to a moderator

Previous Topic:How to add a tool that doesn't have an output?
Next Topic:No Exceptions cuaght C++
Goto Forum:
  


Current Time: Tue Nov 13 07:19:42 GMT 2018

Powered by FUDForum. Page generated in 0.02365 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top