This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Precompiler options


>>>>> Carla Nunes <carlanunes@yahoo.com> writes:

     > Hi all, I'm trying to precompile a .ccc (sql and c++ code) using the
     > -E option of g++ but I got the following message:

     > linker input file unused since linking not done.

     > The command line I used is as follows:

     > g++ -E -DFLAG -Iincdir inputfile.ccc -o outputfile.awk

     > This outputfile will be the input to a awk program that will remove
     > spaces to make the compilation faster.

     > Any clue what is the problem?

     > Thanks, Carla.

As 'man gcc' states:

,----
|   Suffixes  of  source file names indicate the language and kind of pro­
|   cessing to be done:
| 
|   .c    C source; preprocess, compile, assemble
|   .C    C++ source; preprocess, compile, assemble
|   .cc   C++ source; preprocess, compile, assemble
|   .cxx  C++ source; preprocess, compile, assemble
|   .m    Objective-C source; preprocess, compile, assemble
|   .i    preprocessed C; compile, assemble
|   .ii   preprocessed C++; compile, assemble
|   .s    Assembler source; assemble
|   .S    Assembler source; preprocess, assemble
|   .h    Preprocessor file; not usually named on command line
| 
|   Files with other suffixes are passed  to  the  linker. 
`----

Either you need to rename your input file to match any of the listed
extensions, or you need to pass a '-x c++' option to g++.

Claudio


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]