On Sat, Oct 9, 2010 at 3:33 PM, Peter Rockett <p.rockett@...:
> On 09/10/10 13:44, asmwarrior wrote:
> > On 3:59, Martin Mocko wrote:
> >> Hi.
> >>
> >> Previously I had (old, pre mingw-get, gcc 3.4.5) MinGW installed at
> >> c:\dev\_tools\MinGW. I decided to give the new MinGW a try, before
> >> deleting the old one. So I installed it to c:\dev\_tools\mingw-new,
> >> with all the necessary stuff (g++, msys, w32api, etc.).
> >>
> >> Then I tried to migrate my wxWidgets-based project build env to this
> >> new mingw, using Code::Blocks IDE. However, for some reason, the
> >> linker still defaults to old MinGW lib directory, and I can't figure
> >> out what causes this behavior.
> > From the build log, it seems you have different version of lib build
> > from different mingw-gcc. I suggest you need to rebuild your lib with
> > the new-gcc 4.5.
> >
> > Also, Have you correctly set the new compiler tool chain in Codeblocks.
> > You can ask this question in codeblocks' forum.
> Suggest checking Settings-> Compiler and debugger-> Toolchain
> executables in CodeBlocks. I suspect you still have the default
> toolchain set to the old version. You can either create a new toolchain
> and set it as the default, or change the old gcc link.
>
Nay, I have set "Compiler's installation directory" to new dir
("C:\dev\_tools\mingw-new"). This is also confirmed by COMPILER_PATH in the
verbose log I pasted to first message in this thread. Now I also tested it
by temporarily renaming ming32-g++.exe in new installation to something
else, and getting an error.
> You may also need to update the particular project that is giving the
> problem.
>
There doesn't seem to be anything in .cbp file that could cause this.
In fact, I can reproduce problem without using Code::Blocks or wxWidgets at
all. I simply set PATH to c:\dev\_tools\mingw-new\bin, and in command line
use "mingw32-g++ file.c -l<file>" switch. If the "lib<file>.a" in not found
in "c:\dev\_tools\mingw-new\lib", then the one in "c:\dev\_tools\MinGW\lib"
is used. Only after I remove this file from "c:\dev\_tools\MinGW\lib", I get
"not found" error.
Something must be prompting new MinGW to look into old MinGW's directory,
and that something isn't displayed in --verbose listing.
|