Community
Participate
Working Groups
Build ID: I20061214-1445 (Eclipse 3.3 M4) 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 ----------------- More information:
I have the same request. This is an interesting thing when you want to have an linker script parsed by the preprocessor only. Like in linux tree.