Code::Blocks Forums

User forums => Help => Topic started by: smallB on October 29, 2011, 08:19:40 pm

Title: Cannot build cb from source
Post by: smallB 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?
Title: Re: Cannot build cb from source
Post by: Alpha 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
Title: Re: Cannot build cb from source
Post by: zabzonk 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
Title: Re: Cannot build cb from source
Post by: smallB 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?
Title: Re: Cannot build cb from source
Post by: zabzonk on October 30, 2011, 10:35:11 am
Have you installed wxwidgets?
Title: Re: Cannot build cb from source
Post by: smallB 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?
Title: Re: Cannot build cb from source
Post by: smallB 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.
Title: Re: Cannot build cb from source
Post by: zabzonk 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.
Title: Re: Cannot build cb from source
Post by: smallB on October 30, 2011, 01:59:04 pm
Thanks Neil, will try it now.
Title: Re: Cannot build cb from source
Post by: smallB 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|
Title: Re: Cannot build cb from source
Post by: zabzonk on October 31, 2011, 04:57:44 pm
Have you set the CB wx variable as described here http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#Compile_Code::Blocks
Title: Re: Cannot build cb from source
Post by: smallB 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?
Title: Re: Cannot build cb from source
Post by: zabzonk 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.
Title: Re: Cannot build cb from source
Post by: smallB 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 ;)
Title: Re: Cannot build cb from source
Post by: smallB 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.