Can't find error location "Line 0" :-( [message #1794297] |
Tue, 28 August 2018 10:45  |
Eclipse User |
|
|
|
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] |
Tue, 28 August 2018 20:38  |
Eclipse User |
|
|
|
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: Tue, 28 August 2018 20:47] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.05708 seconds