Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » macro names error
macro names error [message #1765238] Wed, 07 June 2017 18:02 Go to next message
Isabel F is currently offline Isabel FFriend
Messages: 2
Registered: June 2017
Junior Member
Hello:
Thanks if someone can help me with this issue.

I´m using eclipse neon with cygwin and googletest and gnu++11. Also working with strings. But when I build the code, It haves 2 errors:

g++ -std=c++0x -std=gnu++11 -D#_GXX_EXPERIMENTAL_GNUXX11_ -O0 -g3 -Wall -c -fmessage-length=0 -std=gnu++11 -MMD -MP -MF"tests/tests.d" -MT"tests/tests.o" -o "tests/tests.o" "../tests/tests.cpp"
<command-line>:0:1: error: macro names must be identifiers
make: *** [tests/subdir.mk:20: tests/tests.o] Error 1
Re: macro names error [message #1765354 is a reply to message #1765238] Thu, 08 June 2017 16:39 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
A macro name must be a C or C++ identifier.
Remove the '#" in the macro definition for _GXX_EXPERIMENTAL_GNUXX11_ to make it a legal identifier.
It may be automatically defined by -std=gnu++11 thus unnecessary but I don't have time at the moment to look it up.

Re: macro names error [message #1765358 is a reply to message #1765354] Thu, 08 June 2017 17:52 Go to previous message
Isabel F is currently offline Isabel FFriend
Messages: 2
Registered: June 2017
Junior Member
It works! Thank you David
Previous Topic:set gcc compiler includes option throw .ini
Next Topic:Cevelop and Microsoft C/C++ toolchain
Goto Forum:
  


Current Time: Tue Sep 24 16:21:16 GMT 2024

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

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

Back to the top