Author Topic: [SOLVED] Help building trunk using version 10.05  (Read 8724 times)

Offline vodoomoth

  • Single posting newcomer
  • *
  • Posts: 8
[SOLVED] Help building trunk using version 10.05
« on: February 26, 2011, 10:33:30 pm »
Hi all,
I am setting up a development environment for a cross-platform project and currently, I am in the process of choosing an IDE. I set my eyes on CodeBlocks because I plan on using wxWidgets. Since the last release is so old, I decided to build from source.

However, I have errors (whether 10.05 or the 2011-02-20 nightly) building the trunk version I grabbed yesterday using the SVN plugin of my Eclipse instance. I also downloaded the source to wxWidgets versions 2.8.11 and 2.9.1. And thanks to @xaviou at wxdev.fr, I also grabbed boost off sourceforge. My system is a Vista SP1 with MingW and MSYS (current versions) both installed around 24 hours back yesterday. As shown below, the gcc version is 4.5.2

In Code::Blocks, I did set the base of global variables wx (to 2.8.11), wx29 and boost to the appropriate top-level folders. I chose "core app and plugins" as build target and clicked the build button. The build fails like this:

Code
Compiling: sdk\uservarmanager.cpp
Compiling: sdk\virtualbuildtargetsdlg.cpp
Compiling: sdk\workspaceloader.cpp
Compiling: sdk\xtra_res.cpp
Linking dynamic library: devel\codeblocks.dll
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lwxpropgrid
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw28u
collect2: ld returned 1 exit status
Process terminated with status 1 (3 minutes, 33 seconds)
2 errors, 0 warnings

Basically, I am interested in some insight and directions, as I've followed the instructions in the BUILD text file that's in the source tree as well as the instructions in the "how to use a nightly build" and yet I'm getting that error.
Thanks.

« Last Edit: March 01, 2011, 09:12:34 pm by vodoomoth »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Help building trunk using version 10.05
« Reply #1 on: February 27, 2011, 01:17:16 am »
Edit: Try building target "all" after building wxWidgets per the direction on the wiki.
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#Compile_wxWidgets_in_Unicode_mode

The below implies wxWidgets 2.8 has not been built or the "wx" global symbol was not set correctly.
Quote
Code
cannot find -lwxmsw28u
« Last Edit: February 27, 2011, 01:43:57 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Help building trunk using version 10.05
« Reply #2 on: February 27, 2011, 08:13:30 am »
wxWidgets migh only be build as debug version.

And building standard C::B against wx2.9 does not work (try C::B's projectfile for wx2.9 instead).

Offline vodoomoth

  • Single posting newcomer
  • *
  • Posts: 8
Re: Help building trunk using version 10.05
« Reply #3 on: February 28, 2011, 10:05:50 pm »
Thanks for your replies.

@stahta01: the link you gave is documentation I didn't have and didn't find when I searched the wiki. Unfortunately, I ran into the bug described at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601 and I just can't build wxWidgets as I only have mingw installed. I've probably launched the build more than ten times, including twice with the supposed "solution" of adding --enable-auto-import in the linker args. I'm giving up until I find the courage and time to try again using another toolchain than strict mingw. How a linker can exhaust 2GB is beyond me.

Offline vodoomoth

  • Single posting newcomer
  • *
  • Posts: 8
Re: Help building trunk using version 10.05
« Reply #4 on: February 28, 2011, 10:49:00 pm »
After my message minutes ago, I decided to try one last build while I'm playing scales on my piano. So I deleted the Mingw directory and installed tdm-gcc. wxWidgets now builds fine in minutes. Not everything is OK yet: the next error is "collect2: ld returned 5 exit status" while building C::B with target All. I guess I'l get there...

Offline vodoomoth

  • Single posting newcomer
  • *
  • Posts: 8
Re: Help building trunk using version 10.05
« Reply #5 on: March 01, 2011, 09:12:50 pm »
OK. The build has finally succeeded.

First problem (missing symbol) was caused by wxWidgets not being built. The solution here is obvious.

Second problem (linker exhausting memory) is a bug (feature, the gcc guys apparently think) introduced in gcc4.5.1 (see link above). The solution is to not use the plain MingW that comes with 4.5.1 and use TDM-GCC4.5.1 instead. I've updated the wiki page to include that info.

Third problem (linker exiting with status code 5) was apparently caused by remainders of previous C::B builds that failed because of problems 1 or 2. Solution: clean project and rebuild.