Author Topic: Cannot build cb from source  (Read 7722 times)

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Cannot build cb from source
« on: October 29, 2011, 08:19:40 pm »
Guys I followed http://www.codeblocks.org/downloads/7 and after exporting src to my hard drive I've opened codeblocks.cbp. After pressing build I'm getting following error:
C:\...\build_tools\autorevision\autorevision.cpp|108|error: 'pclose' was not declared in this scope|
What am I doing wrong?

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Cannot build cb from source
« Reply #1 on: October 29, 2011, 09:17:41 pm »
It works fine for me...

Here are several things to try.  (I do not believe any of them could have caused this problem, but it does not hurt to check.)
Is svn in you path environment (autorevision tries to use this, but it should work without)?
Have cleaned the project?
Are your global variables correctly setup?
Have you checked for changes to the source code:
svn update
svn diff

zabzonk

  • Guest
Re: Cannot build cb from source
« Reply #2 on: October 29, 2011, 09:50:29 pm »
You apparently can't compile CB with the -std=c++0x (and maybe other strict ANSI) option. See http://forums.codeblocks.org/index.php?topic=10003.0
« Last Edit: October 29, 2011, 09:53:27 pm by Neil Butterworth »

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot build cb from source
« Reply #3 on: October 30, 2011, 10:23:09 am »
@Neil Hi, After switching off some of the options like no -std=c++0x anymore, I'm getting:
 (invalid)\include||No such file or directory [enabled by default]|
 (invalid)\contrib\include||No such file or directory [enabled by default]|
 (invalid)\lib\gcc_dll\mswu||No such file or directory [enabled by default]|
Where am I suppose to get those folders from?

zabzonk

  • Guest
Re: Cannot build cb from source
« Reply #4 on: October 30, 2011, 10:35:11 am »
Have you installed wxwidgets?

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot build cb from source
« Reply #5 on: October 30, 2011, 10:55:59 am »
Neil, no I don't think I did. I'm sorry for this. Is there any particular ver. of wxwidgets I'm supposed to install or the latest one is ok?

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot build cb from source
« Reply #6 on: October 30, 2011, 11:13:02 am »
Ok I've installed wxwidgets. I've provided search directories to include folder from wxwidgets but I cannot find the other folders in there. Any thoughts?
Thanks.

zabzonk

  • Guest
Re: Cannot build cb from source
« Reply #7 on: October 30, 2011, 11:16:48 am »
You need to build wxWidgets, or use wxpack at http://wxpack.sourceforge.net - CB requires wxWidgets 2.8 - it won't build with 2.9 . Reading these instructions http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows might also be a good idea.

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot build cb from source
« Reply #8 on: October 30, 2011, 01:59:04 pm »
Thanks Neil, will try it now.

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot build cb from source
« Reply #9 on: October 31, 2011, 04:50:20 pm »
Neil, I've installed wxPack, I believe that I've set up paths in cb to wxwidgets but still getting those three errors: I don't even have this path:
invalid)\lib\gcc_dll\mswu|

zabzonk

  • Guest
Re: Cannot build cb from source
« Reply #10 on: October 31, 2011, 04:57:44 pm »

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot build cb from source
« Reply #11 on: October 31, 2011, 05:46:23 pm »
Hi Neil, yes, It is indeed set. Now I'm getting following error:
C:\wxWidgets-2.8.12\include\wx\platform.h|196|fatal error: wx/setup.h: No such file or directory|
And indeed there is no such file there. Any ideas why?
« Last Edit: October 31, 2011, 05:48:35 pm by smallB »

zabzonk

  • Guest
Re: Cannot build cb from source
« Reply #12 on: October 31, 2011, 06:02:11 pm »
Nope, but you can get that problem if you build wxwidgets from scratch. I would expunge all traces of wx from your system (check with a tool like Everything http://www.voidtools.com) and then re-install from the wxpack setup file, but only install the GCC stuff.

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot build cb from source
« Reply #13 on: October 31, 2011, 06:12:12 pm »
Ok will do. Thanks. Tomorrow'll let you know how I got on.
P.S. As you probably've realized there is just one thread with my "ingenious" suggestions ;)

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot build cb from source
« Reply #14 on: November 01, 2011, 01:46:30 pm »
Hi Neil, Great news. Indeed, installing wxPack just for gcc did the trick. Also as you've already mentioned -std=c++0x MUSTN'T be on.
Thanks Neil for your help.