Code::Blocks Forums

User forums => Help => Topic started by: ollydbg on October 27, 2011, 05:08:58 pm

Title: rev 7531 build failed on mingw gcc 4.6.1
Post by: ollydbg on October 27, 2011, 05:08:58 pm
I just update to the latest trunk, and found that build failed with message below: (building astyle failed)
Quote
[100.0%] g++.exe -shared   -Wl,--dll -Lbase\tinyxml -LE:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll -Ldevel  .objs\plugins\astyle\asstreamiterator.o .objs\plugins\astyle\astyle\ASBeautifier.o .objs\plugins\astyle\astyle\ASEnhancer.o .objs\plugins\astyle\astyle\ASFormatter.o .objs\plugins\astyle\astyle\ASResource.o .objs\plugins\astyle\astyleconfigdlg.o .objs\plugins\astyle\astyleplugin.o .objs\plugins\astyle\dlgformattersettings.o .objs\plugins\astyle\formattersettings.o   -o devel\share\CodeBlocks\plugins\astyle.dll -Wl,--enable-auto-image-base -Wl,--add-stdcall-alias -Wl,--enable-auto-import -Wl,--no-undefined -mthreads  -lcodeblocks -lwxmsw28u
.objs\plugins\astyle\astyleplugin.o: In function `ZN12AStylePlugin15OnFormatProjectER14wxCommandEvent':
E:/code/cb/cb_trunk/src/plugins/astyle/astyleplugin.cpp:135: undefined reference to `_imp___ZN14ProjectManager16GetTreeSelectionEv'
collect2: ld returned 1 exit status
Process terminated with status 1 (1 minutes, 59 seconds)
1 errors, 33 warnings (1 minutes, 59 seconds)
Any ideas?
Title: Re: rev 7531 build failed on mingw gcc 4.6.1
Post by: oBFusCATed on October 27, 2011, 05:32:09 pm
Have you tried a fresh checkout?
Title: Re: rev 7531 build failed on mingw gcc 4.6.1
Post by: MortenMacFly on October 27, 2011, 07:29:45 pm
Have you tried a fresh checkout?
More-over: Do a clean re-build, the SDK has changed. (Reminds me that I forgot to increase the SDK version number... ooops.)
Title: Re: rev 7531 build failed on mingw gcc 4.6.1
Post by: oBFusCATed on October 28, 2011, 12:42:12 am
You can do it now, too :)
Title: Re: rev 7531 build failed on mingw gcc 4.6.1
Post by: ollydbg on October 28, 2011, 01:02:07 am
Have you tried a fresh checkout?
I just run the svn update.
And In TortoiseSVN, all files and folders is green.(which means a flesh local copy)
I even delete two big PCH in include folder, and I hit the "rebuild" button in C::B, but now, I have the same build error. I'm not sure what I can do.
Title: Re: rev 7531 build failed on mingw gcc 4.6.1
Post by: ollydbg on October 28, 2011, 01:20:44 am
OK, I found the reason and solved the problem.

I found that there are two files in the devel folder:
libcodeblocks.dll.a
and
libcodeblocks.a

The former one was an old file, and the later one was using right now, but the former one has more priority for the linker.

PS: Why we have to change the name scheme from libXXXX.dll.a to libXXXX.a? The former one indicates it's a dll export library.
Title: Re: rev 7531 build failed on mingw gcc 4.6.1
Post by: MortenMacFly on October 28, 2011, 10:23:59 am
PS: Why we have to change the name scheme from libXXXX.dll.a to libXXXX.a? The former one indicates it's a dll export library.
Oh man, this has been discussed so many times... please don't start another iteration. :lol:

Basically you can choose yourself now in the project settings, the default is without dll.