Author Topic: How to build ANSI version of C::B from scratch?  (Read 5384 times)

alexeyL

  • Guest
How to build ANSI version of C::B from scratch?
« on: August 27, 2007, 02:59:48 pm »
Hello!
I need to build the ANSI version of CodeBlocks on my Win98 box from scratch. Are there any guidelines or tips&tricks for this? The BUILD file simply says that I should open the recent nightly build of C::B IDE and hit "Build". But I can not! Since I run C::B on Win98 - I can not use any of the recent UNICODE nightly builds.
The second question is: how can I set the option to build the ANSI version instead of the unicode one?

--
Best regards,
Alexey Lyubimov
 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: How to build ANSI version of C::B from scratch?
« Reply #1 on: August 27, 2007, 03:44:53 pm »
Are you using wxWidgets version 2.6.3, 2.64 or 2.8.4?

Have you built ANSI wxWidgets from source?

What SVN version of Code::Blocks do you have working?

Tim S

PS: You might look at my thread here, http://forums.codeblocks.org/index.php/topic,5199.0.html
« Last Edit: August 27, 2007, 03:51:30 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: How to build ANSI version of C::B from scratch?
« Reply #2 on: August 27, 2007, 04:56:58 pm »
Building Code::Blocks on Windows is currently a chicken/egg problem, as the only Windows build process descriptor included with the source is a Code::Blocks project file. If you like, I can create and upload an ANSI build that you can then use however you like -- if nothing else, to build C::B for yourself.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: How to build ANSI version of C::B from scratch?
« Reply #3 on: August 27, 2007, 04:57:55 pm »
You don't necessarily need the latest version of Code::Blocks, the latest ANSI version that you can grab should do. The issue is about the build being dependent on global uservariables, which are not supported in RC2.

You can even build Code::Blocks using RC2, if you can be bothered to edit the include and library paths for every target (that would be about 2 dozen edits). It is not the nice and gentle way, but it is possible.
You would have to replace all instances of $#cb with the location of your sources, and all instances of $#wx with the location of your wxWidgets sources. Although project hacking is giving me the creeps, this could probably be done easiest with text search/replace in an editor.

As for the actual procedere, the whole thing boils down to compiling wxWidgets with UNICODE=0 (and any other flags you want), and compiling Code::Blocks with the same flags, accordingly (this is basically changing one or two build flags to non-unicode, and hitting the blue gear).

Please do note that hardly anyone uses ANSI any more, and we're not actively supporting it any longer for a few months now. We don't deliberately break the ANSI build of course, but we don't put extra work into it, either.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."