Hi Abeer,
There is no easy way of
handling the “preprocess only” case with the project build currently.
The only thing you can
use for now is the “Build selected files” functionality that can be
launched by selecting the files to be built and clicking the “Build
Selected File(s)” context menu.
You might want to raise a
bugzilla request regarding this so that this issue could be addressed in the
future.
Regards,
Mikhail
From:
cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Abeer Bagul
Sent: Wednesday, January 03, 2007
11:13 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] MBS: Linker
step should not run if the flag "Preprocessonly (-E)" is specified in
the compile step
Hi,
While compiling my main.c file, I can specify the flag -E (Preprocess only) in
the project properties dialog (C/C++ Build -> GCC Compiler ->
Preprocessor -> Select the checkbox "Preprocess only").
If this flag is specified, the file which is generated as a result of the
compile step will have the name main.o, but will contain a pre-processed c
file.
The linker invocation fails because the file main.o is not a valid object file.
Is it possible to cancel the invocation of a future command by checking the
value of an option specified for an earlier command?
The console output is:
-----------------------------------------------------------------------------------------
**** Build of configuration Debug for project hello ****
make -k all
Building file: ../main.c
Invoking: GCC C Compiler
gcc -E -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d"
-MT"main.d" -o"main.o" "../main.c"
Finished building: ../main.c
Building target: hello.exe
Invoking: GCC C Linker
gcc -o"hello.exe" ./main.o ./main.o: file not
recognized: File format not recognized
collect2: ld returned 1 exit status
make: *** [hello.exe] Error 1
make: Target `all' not remade because of errors.
Build complete for project hello
-----------------------------------------------------------------------------------------
Thanks
Abeer