User forums > General (but related to Code::Blocks)
Compiler options being ignored on project build
Greatwolf:
I think my post is getting derailed a bit here and I'm still searching for an answer to my original post...
Here's another example to help clarify what I'm asking, if I delete the command macro altogether under 'compile single file to object' and then try to build a project then it will still succeed! How is that possible? Like I said this only happens with the profile for borland. If I tried this instead under GCC or MSVC toolkit profile then it would fail to build properly like it should. The error it gives me in this case is 'Skipping file (no compiler program set)' which makes sense.
stahta01:
Have you turned on Full Compiler Logging and did it show a change when you edited the command?
Note, do not delete the command just do something like "$compiler -v file.c" as the command.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Make sure the default compiler is the compiler you are using.
Tim S.
Greatwolf:
--- Quote from: stahta01 on August 26, 2010, 01:26:18 am ---Have your turn on Full Compiler Logging and did it show a change when you edited the command?
Note, do not delete the command just do something like "$compiler -v file.c" as the command.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Make sure the default compiler is the compiler you are using.
Tim S.
--- End quote ---
Yes I did. I encountered this strange behavior when I was trying to turn off the banner suppression for borland. The original commandline has:
--- Code: ---$compiler -q $options $includes -o$object -c $file
--- End code ---
with -q option hiding the banner. After changing it to this:
--- Code: ---$compiler $options $includes -o$object -c $file
--- End code ---
I found it funny that it still hided the banner and my project didn't have -q anywhere in sight, at the target level or project wide. That's how I encountered this inconsistent behavior.
It's probably a bad idea to delete the command macro from that section but I did it to help me diagnose and troubleshoot the issue. Here is the commandline C::B invokes when I build a sample project:
--- Code: ---//Compilation phase
//Note that that Borland profile is setup with an 'empty' command macro under
//'Compile single file to object' at this point in time.
bcc32.exe -q -v -Od -g0 -Ig:\Borland\BCC55\Include -oDebug\main.obj -c main.cpp
--- End code ---
Is anyone able to confirm and reproduce this behavior? Is it a problem with my configuration of C::B or is it an issue with C::B itself in the way the Borland profile is setup?
stahta01:
Just to confirm you ARE right clicking on the file and choosing build file? Note: I got the same results for rebuild.
After putting "$compiler -v file.c" in place of "$compiler -q $options $includes -o$object -c $file"
This is my build log
--- Code: ---bcc32.exe -v file.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Error E2194: Could not find file 'file.c'
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
--- End code ---
You are doing something wrong; tested using SVN 6271; downloading 10.05 to see if the problem is there. Same good result for CB 10.05.
EDIT: Are you using the native Code::Blocks system? Or are you using an Custom Makefile?
Tim S.
Greatwolf:
Thanks for confirming, sounds like it's something with my configuration then. And no, no custom makefiles were used for this.
Navigation
[0] Message Index
[*] Previous page
Go to full version