News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

rev 7531 build failed on mingw gcc 4.6.1

Started by ollydbg, October 27, 2011, 05:08:58 PM

Previous topic - Next topic

ollydbg

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?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MortenMacFly

Quote from: oBFusCATed on October 27, 2011, 05:32:09 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.)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ollydbg

Quote from: oBFusCATed on October 27, 2011, 05:32:09 PM
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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

ollydbg

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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

MortenMacFly

Quote from: ollydbg on October 28, 2011, 01:20:44 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]