Hi,
I'm noticing something strange. The 'Compile single file to object file' under Advanced compiler options isn't being used by the C::B build system when Borland toolchain is being used. Anyone have any idea why that is? Like for example, I changed 'Compile single file to object file' command line macro to look like this:
cd
$compiler -q $options $includes -o$object -c $file
Note that I have Borland 5.5, 5.82 profile selected when doing this.
Then I click Ok and Ok. Now if I build project with this profile those options for compiling isn't being used at all. The link object files seem to be fine though. I've tested other toolchain profiles like Visual C++ 2005/2008 and those profiles don't appear to have that problem.
Thanks
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.
Yes I did. I encountered this strange behavior when I was trying to turn off the banner suppression for borland. The original commandline has:
$compiler -q $options $includes -o$object -c $file
with -q option hiding the banner. After changing it to this:
$compiler $options $includes -o$object -c $file
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:
//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
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?
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
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
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.