473,378 Members | 1,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

gcc Preprocessor (-E) with comments

Hi,

I need to generate the auto comments for the preprocessed file
(*.i).
These comments must tell which of the Macro is used to substitute a
particular string in the source code.

I am in strage problem

I am getting the below kind of error.

/vobs/tools_vob/ace/ACE_wrappers-5.5.1/ace/Malloc_T.cpp:1045

error: `__xpg_basename' is not a member of `ACE'

At the line 1045 , it makes a call to the function "basename", which
is very well defined !

But after the preprocessor stage, this call is replaced to
"_xpg_basename".
I tried grepping in all the possible places but could not get this
hopeless macro.
So please help me.

Jun 8 '07 #1
2 2078
For this we can use option "gcc -E -dCHARD -o fileWithDefines file.c"

Jun 8 '07 #2
Subra wrote, On 08/06/07 11:24:
Hi,

I need to generate the auto comments for the preprocessed file
(*.i).
These comments must tell which of the Macro is used to substitute a
particular string in the source code.
Neither C nor C++ provide mechanisms for doing this. I've no idea
whether gcc does or not, but that would be a question for a GCC group
not here.
I am in strage problem

I am getting the below kind of error.

/vobs/tools_vob/ace/ACE_wrappers-5.5.1/ace/Malloc_T.cpp:1045
..cpp means it is C++ not C. C++ is not the same as C and is not topical
here.
error: `__xpg_basename' is not a member of `ACE'

At the line 1045 , it makes a call to the function "basename", which
is very well defined !

But after the preprocessor stage, this call is replaced to
"_xpg_basename".
I tried grepping in all the possible places but could not get this
hopeless macro.
So please help me.
C++ does name mangling.

<OT>
I suggest you try looking at using g++ instead of gcc, read the
documentation and/or ask on a GNU group for why.

A group you might find helpful is gnu.gcc.help, but CHECK the group
first. You did not check here before posting otherwise you would have
known this was the wrong place.
--
Flash Gordon
Jun 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jacek Dziedzic | last post by:
.... making things like #endif // of the "#ifdef DEBUG" part valid? Or not? - J.
19
by: qazmlp | last post by:
I hope comp.lang.c will not find the following question as a complete off-topic. I would like to remove ie.comment out the 'cout' statements during compilation(actually preprocessing) time. ...
39
by: Timex | last post by:
I want to delete all comments in .c file. Size of .c file is very big. Any good idea to do this? Please show me example code.
11
by: James Hu | last post by:
This program is long. I don't really want to bore everyone with the details, but it handles wierd cases like: /\ * this is a comment *\ / #define FOO ??/* this is not a comment */ char...
19
by: Alex Vinokur | last post by:
Is there any tool to count C-program lines except comments? Thanks, ===================================== Alex Vinokur mailto:alexvn@connect.to http://mathforum.org/library/view/10978.html...
9
by: Walter Roberson | last post by:
I have run into a peculiarity with SGI's C compiler (7.3.1.2m). I have been reading carefully over the ANSI X3.159-1989 specification, but I cannot seem to find a justification for the behaviour....
2
by: Christopher Ireland | last post by:
Hello, I'm looking for a C# Preprocessor (shareware with source, if possible) which has the functionality of preprocessors which already exist in other languages, e.g. ...
100
by: jacob navia | last post by:
Recently, a heated debate started because of poor mr heathfield was unable to compile a program with // comments. Here is a utility for him, so that he can (at last) compile my programs :-) ...
3
by: Nathan Moinvaziri | last post by:
I am wonder if there is a way to use preprocessor definitions to expose code only if a particular file is included in a project. I am targeting the msvc. I am thinking of something like #if...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.