Author Topic: Building CodeBlocks from source  (Read 2708 times)

Offline Tim

  • Multiple posting newcomer
  • *
  • Posts: 13
Building CodeBlocks from source
« on: January 21, 2023, 05:20:20 pm »
Hi people,

Today I had my first try at building code-blocks.

In order to keep things as simple as possible, I
used CodeBlocks-1.0RC2 as the IDE with the project source
for CodeBlocks-1.0RC2 and I was running under Windows XP.

After hitting "Build" I started examine the generated errors
and found them all to be the use of Forward-slashes instead of
backslashes in the include statements.

I started to change some of the Forward-slashes to back-slashes
and the errors started to reduce.  However I thought
I'd better have a look at the wxWigets source (I made a guess
at version 2.6 as it didn't specify) and saw the same slash
problem facing me.

I then looked at the latest Code-blocks source to see if any
conditional compile directives had been added but couldn't
find any.

So, my question is:- Is Code-blocks always compiled under Linux?
or am I missing something fundamental?


Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Building CodeBlocks from source
« Reply #1 on: January 22, 2023, 11:41:16 pm »
No, forward and backward slashes should work on windows. What compiler are you using? It is possible that old compiler are not capable of this...

Offline Tim

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Building CodeBlocks from source
« Reply #2 on: January 24, 2023, 10:24:04 pm »
Thanks for your reply.

Your answer has given me pause for thought. After a few experiments I see use of the
forward slash is not always as I thought on windows.

XP will accept the forward-slash in a DOS box, but will display the result using a back-slash's only.

Win2k & Win98 just report a syntax error.

Also a new "Win32 GUI Application" project under Code-blocks v1.0RC2 and 20.03 with mingw32 also work with forward-slash's under XP at least. (This really surprised me)

I still don't know why the (Code-blocks v1.0RC2 project) won't accept forward-slash's, but I will find out why
now that I "know" that forward-slash's "can work".

As my professional coding career ended while I was still working with MSVC6 & 2K around 2003,
I was convinced that forward-slash's could not be used on a windows system and I now feel like a stroke victim trying to work around a forward-slash blind spot.

When I find the answer to the (Code-blocks v1.0RC2 project) problem, I'll report back here.
possibly it's a compiler switch like use the c99 standard.