News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Building CB from source on Windows

Started by eldiener, July 11, 2015, 01:52:08 AM

Previous topic - Next topic

eldiener

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 ?

stahta01

#1
Quote from: eldiener on July 11, 2015, 01:52:08 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

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Jenna

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

eldiener

Quote from: stahta01 on July 11, 2015, 01:55:26 AM
Quote from: eldiener on July 11, 2015, 01:52:08 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

Tim S.

Evidently the 2.8.12 release of wxWidgets will not work on Windows7. I will try the latest 3.0.2 release.

stahta01

#4
Quote from: eldiener on July 12, 2015, 02:04:37 AM
Evidently the 2.8.12 release of wxWidgets will not work on Windows7.

False.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

eldiener

Quote from: stahta01 on July 12, 2015, 02:45:14 AM
Quote from: eldiener on July 12, 2015, 02:04:37 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)) ===|

Jenna

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.