User forums > Using Code::Blocks
Codeblocks portable
imianz:
Well, thanks...
oBFusCATed:
--- Code: ---Compiler relative path: $(CODEBLOCKS)\MinGW
--- End code ---
This is the problem, the CC doesn't do macro replacements, it seems...
imianz:
ok, do you believe that you can fix it?
ollydbg:
--- Quote from: oBFusCATed on October 05, 2011, 02:18:56 pm ---
--- Code: ---Compiler relative path: $(CODEBLOCKS)\MinGW
--- End code ---
--- End quote ---
This is not the log message. :D :D
--- Quote ---This is the problem, the CC doesn't do macro replacements, it seems...
--- End quote ---
True.
@imianz
You'd better post your log message in the code/quote tab.
ollydbg:
--- Code: ---Index: E:/code/cb/cb_trunk/src/plugins/codecompletion/nativeparser.cpp
===================================================================
--- E:/code/cb/cb_trunk/src/plugins/codecompletion/nativeparser.cpp (revision 7475)
+++ E:/code/cb/cb_trunk/src/plugins/codecompletion/nativeparser.cpp (working copy)
@@ -663,7 +663,9 @@
if (compiler->GetID().Contains(_T("gcc")))
{
wxFileName fn(wxEmptyString, compiler->GetPrograms().CPP);
- fn.SetPath(compiler->GetMasterPath());
+ wxString masterPath = compiler->GetMasterPath();
+ Manager::Get()->GetMacrosManager()->ReplaceMacros(masterPath);
+ fn.SetPath(masterPath);
fn.AppendDir(_T("bin"));
const wxArrayString& gccDirs = GetGCCCompilerDirs(fn.GetFullPath());
TRACE(_T("Adding %d cached gcc dirs to parser..."), gccDirs.GetCount());
@@ -792,7 +794,9 @@
if (CompilerID.Contains(_T("gcc")))
{
wxFileName fn(wxEmptyString, ((Compilers[idxCompiler])->GetPrograms()).CPP);
- fn.SetPath((Compilers[idxCompiler])->GetMasterPath());
+ wxString masterPath = (Compilers[idxCompiler])->GetMasterPath();
+ Manager::Get()->GetMacrosManager()->ReplaceMacros(masterPath);
+ fn.SetPath(masterPath);
fn.AppendDir(_T("bin"));
const wxArrayString& gccDirs = GetGCCCompilerDirs(fn.GetFullPath());
TRACE(_T("Adding %d cached gcc dirs to parser..."), gccDirs.GetCount());
@@ -837,7 +841,9 @@
return false;
wxFileName fn(wxEmptyString, compiler->GetPrograms().CPP);
- fn.SetPath(compiler->GetMasterPath());
+ wxString masterPath = compiler->GetMasterPath();
+ Manager::Get()->GetMacrosManager()->ReplaceMacros(masterPath);
+ fn.SetPath(masterPath);
fn.AppendDir(_T("bin"));
static std::map<wxString, wxString> defsMap;
@@ -917,7 +923,10 @@
Compiler* compiler = CompilerFactory::GetCompiler(compilerId);
if(!compiler)
return false;
- wxString cmd = compiler->GetMasterPath() + _T("\\bin\\") + compiler->GetPrograms().C;
+
+ wxString masterPath = compiler->GetMasterPath();
+ Manager::Get()->GetMacrosManager()->ReplaceMacros(masterPath);
+ wxString cmd = masterPath + _T("\\bin\\") + compiler->GetPrograms().C;
Manager::Get()->GetMacrosManager()->ReplaceMacros(cmd);
// wxExecute can be a long action and C::B might have been shutdown in the meantime...
--- End code ---
The patch should fix the problem, but do we need to refactor the function body GetMasterPath()?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version