User forums > Using Code::Blocks

CB ignores search directories/Global variables

<< < (7/7)

eb:
D'Oh!

btw - It seems that the settings under Project->Build options trump those under Compiler and debugger settings.
Things are starting to make sense now.
Thanks again Tim S.

oBFusCATed:
Yes, also you can manage if the target or project options take precedence by using the Policy combo box.

@devs:
Another patch to improve debuggability:


--- Code: ---Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp     (revision 7810)
+++ src/plugins/compilergcc/compilergcc.cpp     (working copy)
@@ -2366,9 +2366,19 @@
             ProjectBuildTarget* tgt = prj->GetBuildTarget(tlist[x]);
             if (!CompilerValid(tgt))
             {
+                Compiler *compiler = CompilerFactory::GetCompiler(GetCurrentCompilerID(tgt));
+                wxString compilerName, compilerName2(wxT("unknown"));
+                if (compiler)
+                {
+                    compilerName = wxT("(") + compiler->GetName() + wxT(") ");
+                    compilerName2 = compiler->GetName();
+                }
                 wxString msg;
-                msg.Printf(_T("\"%s - %s\": The compiler's setup is invalid so Code::Blocks cannot find/run the compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping..."),
-                            prj->GetTitle().wx_str(), tlist[x].wx_str());
+                msg.Printf(_T("\"%s - %s\": The compiler's setup %sis invalid, so Code::Blocks cannot find/run the compiler.\n")
+                           _T("Probably the toolchain path within the compiler options is not setup correctly?!\n")
+                           _T("Goto Settings->Compiler and debugger...->Global compiler settings->%s->Toolchain executables\n")
+                           _T("Skipping..."),
+                           prj->GetTitle().wx_str(), tlist[x].wx_str(), compilerName.wx_str(), compilerName2.wx_str());
                 Manager::Get()->GetLogManager()->LogWarning(msg, m_PageIndex);
                 continue;
             }

--- End code ---
What do you think?

oBFusCATed:
@devs: any comments for my patch?

Jenna:

--- Quote from: oBFusCATed on February 19, 2012, 01:49:52 pm ---@devs: any comments for my patch?

--- End quote ---
My opinion: commit it.

MortenMacFly:

--- Quote from: jens on February 19, 2012, 02:38:59 pm ---My opinion: commit it.

--- End quote ---
Dito.

Navigation

[0] Message Index

[*] Previous page

Go to full version