I think I've found the bug.
VersionString += Major;
VersionString += Minor;
VersionString += Revision;
Every time there is an error and the adjustment page cannot continue, these lines add 'Major' + 'Minor' + 'Revision' to 'VersionString' again and again.
Thanks, I fixed this bug by adding a line to reset the VersionString
VersionString = _T(""); // set to empty string, then append three version numbers
...
Then I checked search directories and the entries were,
$(#cv)\x86\mingw\lib
$(#cv)\x86\mingw\bin
but they should be,
because I've changed them in version adjustment page to use these values. And if I change them manually, the wizard works.
1.
does not exist. If you define a global variable named "cv", cv.include and cv.bin are automatically defined by C::B, but no "cv.bin". (see the code snippet in C::B source below). So if you leave cv.include setting empty in Global variable editor dialog, this value is translated to "include" subfolder of cv base.
wxString UserVariableManager::Replace(const wxString& variable)
{
wxString package = variable.AfterLast(wxT('#')).BeforeFirst(wxT('.')).MakeLower();
wxString member = variable.AfterFirst(wxT('.')).MakeLower();
wxString path(cSets + m_ActiveSet + _T('/') + package + _T('/'));
wxString base = m_CfgMan->Read(path + cBase);
if (base.IsEmpty())
{
if (Manager::Get()->GetProjectManager()->IsLoading())
{
// a project/workspace is being loaded.
// no need to bug the user now about global vars.
// just preempt it; ProjectManager will call Arrogate() when it's done.
Preempt(variable);
return variable;
}
else
{
wxString msg;
msg.Printf(_("In the currently active Set, Code::Blocks does not know\nthe global compiler variable \"%s\".\n\nPlease define it."), package.c_str());
InfoWindow::Display(_("Global Compiler Variables"), msg , 8000, 1000);
UsrGlblMgrEditDialog d;
d.AddVar(package);
PlaceWindow(&d);
d.ShowModal();
}
}
if (member.IsEmpty() || member.IsSameAs(cBase))
return base;
if (member.IsSameAs(cInclude) || member.IsSameAs(cLib) || member.IsSameAs(cObj))
{
wxString ret = m_CfgMan->Read(path + member);
if (ret.IsEmpty())
ret = base + _T('/') + member;
return ret;
}
wxString ret = m_CfgMan->Read(path + member);
return ret;
}
Notice:
if (member.IsSameAs(cInclude) || member.IsSameAs(cLib) || member.IsSameAs(cObj))The reason I use such setting is that when I extract the file: OpenCV-2.4.4.exe, I see such structure:
E:\code\opencv\OpenCV-2.4.4\opencv\build -> I set this folder as "cv" base
E:\code\opencv\OpenCV-2.4.4\opencv\build\include -> this becomes $(#cv.include), in-fact, it is the same as $(cv)\include, but we prefer the former way
.
E:\code\opencv\OpenCV-2.4.4\opencv\build\x86\mingw\lib -> this becomes $(#cv)\x86\mingw\lib
E:\code\opencv\OpenCV-2.4.4\opencv\build\x86\mingw\bin -> this becomes $(#cv)\x86\mingw\bin
The most import thing is the "cv" base, then all the sub-paths are relative paths.
2, In such directory structure, you can either set cv.lib in Global variable editor dialog as $(#cv)\x86\mingw\lib, then you can use $(#cv.lib) in your compiler settings, or you can leave cv.lib in Global variable editor dialog as empty string, then use $(#cv)\x86\mingw\lib in your compiler settings.
3, The reason I have $(#cv)\x86\mingw\bin in linker search paths is that C::B will automatically add this path to PATH when it run the app, so you don't need to add to bin paths to your system's PATH.
Edit: I think the lines under 'function SetupProject(project)'
project.AddIncludeDir(OpenCVPathDefaultInc);
project.AddLibDir(OpenCVPathDefaultLib);
project.AddLibDir(OpenCVPathDefaultBin);
should be
project.AddIncludeDir(OpenCVPathInc);
project.AddLibDir(OpenCVPathLib);
project.AddLibDir(OpenCVPathBin);
Thanks, fixed.
2- You included CV ver1 style headers in 'main.cpp', wouldn't it be better if they are ver2 style? Just a thought.
Ok, updated to new cv::Mat.
The attachment is the new wizard package, feedback are welcome, thanks.
[attachment deleted by admin]