Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: eldiener on July 11, 2015, 01:52:08 am

Title: Building CB from source on Windows
Post by: eldiener on July 11, 2015, 01:52:08 am
I am trying to build CB from source on Windows. I get the latest source from SVN. I open the BUILD file. It tells me I need a nightly build. I download the latest nightly build as well as the pre-compiled wx-widgets DLL. I extract the pre-compiled wx-widgets DLL to a directory in my PATH. I extract the nightly buiild.

I start the nightly build version of CB. It does not automatically find the mingw-64/gcc-5.1 version I want to use but I go into the "Global compiler settings" and 'Toolchain executables' I set the correct values.

I then open the src/CodeBlocks.cbp project but it tells me that 'wx' is not defined. The notes at http://www.codeblocks.org/downloads/25 tells me:

'When opening a Code::Blocks project file it will usually ask you to define the root of the global compiler variable named "wx" which you simply point to the extracted folder from that archive.'

What was extracted from the arhive is not a folder but the wxwidgets DLL. To what value do I set 'wx' ?

There is also a 'cb_release_type' global variable. But the BUILD notes say nothing about that. To what am I supposed to set that ?
Title: Re: Building CB from source on Windows
Post by: stahta01 on July 11, 2015, 01:55:26 am
There is also a 'cb_release_type' global variable. But the BUILD notes say nothing about that. To what am I supposed to set that ?

Set 'cb_release_type' global variable to either a space " " or to "-g" for debug enable build.

The wx is to be set to the location of the wxWidgets 2.8 installation which needs an sub-folders called include and lib.

Edit1: There is a CB download of most or maybe even all of the wx files needed I found it accidentally a few months back.
Edit2: Link to it http://sourceforge.net/projects/codeblocks/files/Sources/13.12/wxMSW-2.8.12.7z/download (http://sourceforge.net/projects/codeblocks/files/Sources/13.12/wxMSW-2.8.12.7z/download)

Tim S.
Title: Re: Building CB from source on Windows
Post by: Jenna on July 11, 2015, 09:28:39 am
You need wxWidgets develpment files (with headers), not only a pre-build library to build C::B.

See http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows)
Title: Re: Building CB from source on Windows
Post by: eldiener on July 12, 2015, 02:04:37 am
There is also a 'cb_release_type' global variable. But the BUILD notes say nothing about that. To what am I supposed to set that ?

Set 'cb_release_type' global variable to either a space " " or to "-g" for debug enable build.

The wx is to be set to the location of the wxWidgets 2.8 installation which needs an sub-folders called include and lib.

Edit1: There is a CB download of most or maybe even all of the wx files needed I found it accidentally a few months back.
Edit2: Link to it http://sourceforge.net/projects/codeblocks/files/Sources/13.12/wxMSW-2.8.12.7z/download (http://sourceforge.net/projects/codeblocks/files/Sources/13.12/wxMSW-2.8.12.7z/download)

Tim S.

Evidently the 2.8.12 release of wxWidgets will not work on Windows7. I will try the latest 3.0.2 release.
Title: Re: Building CB from source on Windows
Post by: stahta01 on July 12, 2015, 02:45:14 am
Evidently the 2.8.12 release of wxWidgets will not work on Windows7.

False.

Tim S.
Title: Re: Building CB from source on Windows
Post by: eldiener on July 12, 2015, 04:08:57 am
Evidently the 2.8.12 release of wxWidgets will not work on Windows7.

False.

Tim S.

||=== Build: tinyXML in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: AutoRevision in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: ConsoleRunner in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Squirrel in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Squirrel std lib in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: SqPlus in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: scintilla in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
C:\Utilities\wxMSW-2.8.12\include\wx\platform.h|196|fatal error: wx/setup.h: No such file or directory|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 2 second(s)) ===|
Title: Re: Building CB from source on Windows
Post by: Jenna on July 12, 2015, 11:08:09 am
wx 2.8.12 works on all actual windows releases.
But you have to build the sources or if you use binaries, use the same compiler as the maintainer of the binaries has used.