Author Topic: rev 7531 build failed on mingw gcc 4.6.1  (Read 5846 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
rev 7531 build failed on mingw gcc 4.6.1
« 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?
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: rev 7531 build failed on mingw gcc 4.6.1
« Reply #1 on: October 27, 2011, 05:32:09 pm »
Have you tried a fresh checkout?
(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!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: rev 7531 build failed on mingw gcc 4.6.1
« Reply #2 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.)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: rev 7531 build failed on mingw gcc 4.6.1
« Reply #3 on: October 28, 2011, 12:42:12 am »
You can do it now, too :)
(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!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: rev 7531 build failed on mingw gcc 4.6.1
« Reply #4 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.
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: rev 7531 build failed on mingw gcc 4.6.1
« Reply #5 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.
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: rev 7531 build failed on mingw gcc 4.6.1
« Reply #6 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ