Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: stahta01 on February 08, 2019, 11:19:18 pm

Title: Update wiki directions to 3.0.4 for build C::B
Post by: stahta01 on February 08, 2019, 11:19:18 pm
Good or bad idea to update wiki direction to using wxWidgets version 3.0.4? (

Tim S.
Title: Re: Update wiki directions to 3.0.4 for build C::B
Post by: BlueHazzard on February 09, 2019, 01:29:26 am
I think the wiki should be updated to use the system default wxWidgets installation. Does something speak against it? I mean every up to date distro has  a wxWidgets that should work with codeblocks, without compiling it by our self, why bother the user with the whole process to compile and install it?
Title: Re: Update wiki directions to 3.0.4 for build C::B
Post by: oBFusCATed on February 09, 2019, 11:46:03 am
Yes, the native lib should be preferred. Everything else causes problems to novices.
Title: Re: Update wiki directions to 3.0.4 for build C::B
Post by: rcttsoul on March 01, 2019, 04:41:52 pm
The ENTIRE wiki needs updated, not even the instructions for a Windows install is wrong.
Title: Re: Update wiki directions to 3.0.4 for build C::B
Post by: stahta01 on March 02, 2019, 09:18:16 pm
The ENTIRE wiki needs updated, not even the instructions for a Windows install is wrong.

So, the Windows install directions is correct?

Tim S.
Title: Re: Update wiki directions to 3.0.4 for build C::B
Post by: oBFusCATed on March 02, 2019, 09:38:34 pm
Good, but can we get back to constructive criticism, please?
Saying that something is totally wrong and should be re-written from scratch is not constructive, not has a good chance of success.
But saying something like :
I've followed the instructions on page X. They don't work. Step3 is totally wrong. You should add these steps between step 2 and step 3.
is a lot better and there is a chance that someone would do something to improve the situation.
Title: Re: Update wiki directions to 3.0.4 for build C::B
Post by: Nohbdy on March 17, 2019, 11:50:49 pm
I am currently in the process of following this wiki myself. I am midway through but I thought I might bring some info on my process so far and how it might help the wiki. Also, just my own recommendations. Note that I am a sort of hybrid newcomer in that I am sometimes just as confused as can be, but I also have some awareness and light know-how of when to dig deeper, use certain tools or use alternatives, etc.

Firstly, I'd simply recommend an alternative to direct links to specific versions, or at least saying something akin to "At the time of this writing([date]), the link is: ". Primary confusion right now for me is under Prerequisites->wxWidgets, where it says "Download:". In my perspective, here are my thoughts when reading:
- Initially, I assume I will be downloading the newest wxWidgets from the official site. Noticing this other download link of an older version makes me question some things though:
-- I see "For more information, go here". Since it is not telling me to go here explicitly, I slightly question the idea of getting the newest version.
-- I see the "Download:". As an absolute newcomer I would assume this is the entire wxWidgets, it's everything I need - I would probably download this and move on. However, I've already downloaded the freshest version, and I see this is nowhere near the same filename..
--- I now think: Okay, maybe I just also need this file..
--- I also think: But... maybe I should find the freshest version of this wxMSW thing..
--- I also think: But... maybe this is an indication that I need specifically this wxMSW version... will that work with the newer wxWidgets I intend to use?
--- I also think: No wait, perhaps I not only need this older wxMSW, but I need the matching, older wxWidgets. Hmmm...

Ah but wait forgive me, I've skipped the MinGW installation. I have a properly working Code::Blocks already(binary download + mingw. I opted not to use a nightly build, as I tried that once and it nearly seems more confusing than the process on this page), so the "MinGW Installation" link seems redundant. However, little do I know that the MinGW will be used to build wxWidgets itself! This in itself leads to a few problems, but perhaps this is my fault due to how I went about it:
- I go to download the freshest MinGW. If I was an absolute newcomer, I may accidentally download the old MinGW rather than the one at - as the old appears prominently first via Google search.
- I see that the "Downloads" page has a "Win-Builds". I am using Windows, so absolute-newcomer me might have went straight for this. However, I actually see that choice is using much older versions! Thankfully, I not only see "Msys2" has the freshest versions possible, but I've actually used it before(Failed attempt at doing this, or a nightly, years ago :P)!
-- As Msys2 seems definitely the best way to go for a Windows user, I take this path...
-- When performing an initial pacman -Syu as recommended in other guides, I feel things are on the right track!
(Some skipping around here, sorry. Figuring this part out took a while, not sure how to fully explain hehe.)
-- I figure out the TortoiseSVN usage and get the source code easily!
-- I am now trying to build wxWidgets as per the "Installing Code::Blocks from source on Windows" wiki:
--- The "Configure Build Options" section is clear. Perhaps if I was newer I'd be bewildered here, but for me I finally understand sometimes you just gotta edit a text file. (This is actually kinda hard to grasp at first coming from Windows GUI world). I copy and paste the build options I want(just silencing warnings) properly. This section explains things fine.
--- The "Build wxWidgets Library" part causes me pain, but after some time, I realize that Msys2 did not only need pacman -Syu. When you enter pacman -F, it says something about MinGW stuff not a part of the database or something. Without a Google search nor a guide, I realize I must also enter pacman -Fy. Now I can finally build wxWidgets.

Anywhoozle, I'm at that point right now so I'll edit or post an update of any other snags I come across. Obviously much of the pain was on the MSYS2 and MinGW side of things. It is also confusing in Msys2 land because it seems to already "have" MinGW, but.. perhaps not the latest unless you explicitly get it? Also, through MSYS2 I noticed I could simply download wxWidgets(pacman -S mingw-w64-x86_64-wxWidgets), alas it is not clear if this would work out fine with building Code::Blocks, and I've yet to deal with the wxMSW portion so I'm unsure if that also needs a separate download(and if it can be done via MSYS2 since it's starting to feel like quite a nice hub for doing all this stuff).

UPDATE: I now understand that wxMSW is the windows installer. Well, that clears up that(might edit the above later to remove those mentionings - however the point was kinda how confusing it looks as a perspective).
It also looks like mingw-w64-x86_64-toolchain is the package to get for the installation steps. I seemed to have downloaded a myriad of other packages or something, but this one appears to be the one that even activates the ability to use mingw32-make. On a related note, online you will find discussions on how mingw32-make and make are... I have no idea actually. Basically, a new user might be told to just use make over mingw32-make, however in MSYS2 this causes it to just hang there, requiring ctrl+C to exit whatever the fudge it's doing(Note: ctrl+C to cancel these things - other than being confusing with copying on Windows - is yet another piece of knowledge an absolute newcomer will likely know nothing about.)

- Newest development version of wxWidgets BUILT successfully, but building steps from within Code::Blocks failed (popen and pclose not defined). Going to try the link in wiki verison.
- "" version failed during build ("loses precision" cast errors). Going to try latest "stable" wxWidgets..

UPDATE3: Nevermind, getting a Nightly Build is far easier! I still refuse to give up on the Self-Hosting option(that's the correct term, right?), but I will use the nightly CodeBlocks to do so next time. I feel I may have to still experiment with the correct MinGW and possibly wxWidgets.
Title: Re: Update wiki directions to 3.0.4 for build C::B
Post by: sodev on March 19, 2019, 07:52:50 pm
I don't understand two things:

The title of this thread sounds generic, the first post targets linux, but the last reponse targets windows, so i contribute to this confusion and give a small heads up for the windows side. I am self building wxWidgets and CodeBlocks for around 10 years now and did never face (or at least can't remember having faced them in the recent past ;D) these strange problems i have seen in this thread and others.

A small note for the Linux side, there it usually boils down to figure out which system packages are missing, and yes, this is sometimes not so easy, until configure doesn't complain anymore. Now to the Windows side.

Building wxWidgets

CodeBlocks is designed to work with wxWidgets build with the pre-generated Makefiles (sadly from the time before they version-tagged the output, but this can be easily fixed). I refuse to use a POSIX-Environment (MSYS2) to build stuff on Windows so i use a plain MinGW-w64 installation. The wxPack script makes it easier to build all the different flavors of wxWidgets, i use a slightly extended version mainly to build the samples and wxrc and to adapt some settings for MSVC builds, for this the version from github is sufficient, you just need to adapt the paths to your MinGW-w64 installation (details follow). I always build the master branch of wxWidgets from Github, so just clone that repository.

Building CodeBlocks

I am building CodeBlocks with CodeBlocks, this is the easiest approach. You need to do some small setup in CodeBlocks and prepare an output directory. Right now i am building against wxWidgets 3.1.x so the paths reflect that.

Title: Re: Update wiki directions to 3.0.4 for build C::B
Post by: tigerbeard on March 20, 2019, 11:48:13 am
I don't understand two things:
  • Why do people who can barely turn on a computer think they need to code C/C++
Because they don't  ;).
You might agree that even world leading coding experts can be easily confused by being thrown into a different corner of the IT world where they are confroned with things they have never used before or heard of before.
Everything gets trivial after doing it for a while. But I get humble when I look at my own notes taken when starting to use Linux. I can't believe the stuff I had trouble with :-[.

For open source projects I believe the hardest challenge is to write up documentation suitable for all levels of experience. Often a lot harder than coding stuff. So I think we should appreciate and value all feeback we can get.

For me both posts @sodev and @Nohbdy have good value and are constructive and I'd love to read more.