Author Topic: Installing Code::Blocks Windows XP SP3  (Read 26362 times)

Offline Tim

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Installing Code::Blocks Windows XP SP3
« Reply #15 on: August 08, 2021, 10:03:53 am »
Hi Andrew,

I appreciate you taking the time looking into this issue. I looked at my msvcrt.dll ver and it's
the same version, not surprising really as I also got my latest XP iso's from archive.org.

There's a certain "Karma" going on for me over the "XP x64" issue. I use XP "just because",
but I have only been using the x64 version for 6 months because I appear to have picked up
some sort of 'malware' (Eating up cpu cycles)  in one of my app's which I have not been able
to get to the bottom of. So I switched to x64 in the hope the 'malware' would not be able to
run under x64 and luckily it doesn't. If and when I feel the urge I will try and find out which
apps the 'malware' resides in and kill it off, and go back to XP-32bit.
So "XP x64" limitations have saved my bacon over the malware issue, so to complain about
those same limitations would be very churlish of me. I think I picked up the infection while
searching for cpld & fpga software license keys on some Russian & Chinese sites.

"Virtualbox" I've only tried it once but failed due to windows versions not being specified prior to
downloading the software. After waiting an hour for a download only to be told I need to
"upgrade my OS" I lost interest. That said, I partition my drives with multiple primaries,
and at present use "bootus" in the mbr for system selection. I use win2K permanently on one
partition for OS management. (format & copy systems to and from different partitions) It takes
2-3 minutes to format and copy a new XP system on to a partition. I've been doing this sort of
thing since 1997 but then used IBM's OS2 bootloader for system selection.

A year ago I tried Codeblocks with a Win32 GUI project and after I had found out about
ResEdit, I was amazed how easy it all seemed, especially since I haven't really done any
windows programming since 2005 when I was using MSVC6. This unexpectedly pleasant
experience has been in the back of my mind when I've been using Eclipse for playing
around with STM32 programming. I'm sure you can imagine that using Eclipse on my Intel
socket 775 Q6700 running XP is like going for a walk with bags of sand tied to my feet.
With this in mind I decided it was time I found out why I've not seen any STM32 development
going on with Codeblocks.

Now after 3 days of reading posts, gnu and JLink pdf's I think I'm starting to understand the
reasons for the lack of open source STM32 development. It seems to me that the skill-set
needed is soo wide that anyone having the full set will probably be considered by polite
society to be "Mad as a Hatter". That said if I think I have anything useful to say on the
subject I'll start a new topic thread.

One thing I can say is that if I had read "UM08001_JLink.pdf" first, I would have saved
me a lot of time as it gave me a very lucid overview of the real world debug procedure,
which put the gnu tools and forum posts into context.

Tim

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: Installing Code::Blocks Windows XP SP3
« Reply #16 on: August 08, 2021, 11:09:59 am »
Tim,

Embedded systems development is easy if things work, but are f***ing hard as h**l if something does not want to play ball. I know all about it, I have done embedded systems on 8051, I80960 (a risc based CPU from intel 25 yrs ago), I386EX (16 bit) and AMD Elan 410 (486 32 bit) and lately Linux. Luckily the latest Linux was using SLD2 so I migrated the code base onto a real Linux OS and also MS VS2017 and C:B using MSYS2 after writing peripheral simulators.

If you can move the STm32 app onto Linux where you simulate the hardware it will make your life so much easier. For NVRAM malloc it and load/save it to a file on startup or shutdown or when you request it.

A for upgrading your PC check out the AMD 5 5600G or AND 7 5700G that was released last Thursday. I ordered on Friday a new PC with the 5700G in it that I should get in the middle of the week from a local computer store. I find VirtualBox acceptable if you give it say 4 or 8GM and 4 CPU's when running Linux or Windows. I have used it with 1Gb and 1 CPU and it was way too slow....

Some pages that may help you with C::B and STM32:
    https://www.codeproject.com/Tips/601093/Creating-STM-Microcontroller-Project-in-Code-Blo
   https://github.com/i25ffz/stm32f4-codeblocks-dev
   https://imagecraft.com/?catid=0&id=10
   https://sourceforge.net/projects/codeblockeps-ni/

So it looks like other people have enhanced their C:B version for STM32 usage, but as far as I can see none of it has made it into the C::B mainline source tree.

Offline benezan

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Installing Code::Blocks Windows XP SP3
« Reply #17 on: April 04, 2023, 03:59:37 pm »
Dear LETARTARE,

It works, thank you!

For those, who experience similar problems.
Go to https://sourceforge.net/p/codeblocks/code/11196/tree/trunk/src/exchndl/win32/bin/
Download all 6 files. Place to Codebloks directory (overwrite will be required).
So, it still works with XP, such a relief!

I have XP SP3 32 Bit. I've tried the above procedure but when I start C::B (V20.03 32bit) I get the error message "C:\Programme\CodeBlocks\exchndl.dll is not a valid windows file". Any ideas what I can do?

BTW, installing V20.03 fresh and without the patch gives the error message "entry point "kernel32.ReleaseSRWLockExclusive" was not found in DLL "api-ms-win-core-synch-l1-1-0.dll". I guess that DLL was installed as part of some Visual C++ redistributable required for some other software. Maybe a newer version could help?
« Last Edit: April 04, 2023, 04:17:19 pm by benezan »

Offline seahawkibiza

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Installing Code::Blocks Windows XP SP3
« Reply #18 on: April 04, 2023, 05:10:46 pm »
With a fresh installation of XP SP3 without any other programs comes the error message of missing some dlls.
(first attachment)

After a short search I found, that all dlls are included in a Universal C Update.
But this update only is availabe above winXP (Vista etc..).

So - if someone has installed C::B on WinXP, whats the exact workflow to install?
« Last Edit: April 04, 2023, 05:13:38 pm by seahawkibiza »

Offline nenin

  • Almost regular
  • **
  • Posts: 201
Re: Installing Code::Blocks Windows XP SP3
« Reply #19 on: April 10, 2023, 10:55:42 am »
After a short search I found, that all dlls are included in a Universal C Update.
There are UCRT versions, which are installable on XP. I did it +/- before COVID. Also you can try to find "unofficial" SP3+ for XP, which includes all useful updates from MS after SP3.
Quote
So - if someone has installed C::B on WinXP, whats the exact workflow to install?
I used described above  order. Its running, with minor glitches.

Offline seahawkibiza

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Installing Code::Blocks Windows XP SP3
« Reply #20 on: April 10, 2023, 06:36:25 pm »
Thanks, but this are only english versions. My XP is german and I cant install english Service packs.

Still today I can not find any solution to install C::B on Windows XP  >:(

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Installing Code::Blocks Windows XP SP3
« Reply #21 on: April 10, 2023, 06:51:27 pm »
To seahawkibiza:

So, have you copied the old C::B DLLs which is the normal fix for this issue or not?

Note: One person tried the DLLs from here https://github.com/acotty/CodeBlocks_Unofficial_Testing/tree/master/src/exchndl/Win_XP/win32 instead of the old CB DLLs. IIRC, they said it worked.

Tim S.
« Last Edit: April 10, 2023, 10:29:55 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 nenin

  • Almost regular
  • **
  • Posts: 201
Re: Installing Code::Blocks Windows XP SP3
« Reply #22 on: April 11, 2023, 08:25:40 am »
Thanks, but this are only english versions. My XP is german and I cant install english Service packs.

Still today I can not find any solution to install C::B on Windows XP  >:(
I installed EN VC runtime (UCRT) on PL WinXP:  Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.24.28127, 06/02/2020  15:07:05 .    No problems.
Also you can try replacement set of the DLLs, proposed by stahta01 - at my first look they should be XP-compatible.

Offline benezan

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Installing Code::Blocks Windows XP SP3
« Reply #23 on: April 11, 2023, 04:45:29 pm »
Note: One person tried the DLLs from here https://github.com/acotty/CodeBlocks_Unofficial_Testing/tree/master/src/exchndl/Win_XP/win32 instead of the old CB DLLs. IIRC, they said it worked.

I've tried those 5 files and it doesn't work for me. I still get the same error message "C:\Programme\CodeBlocks\exchndl.dll is not a valid windows file".

I suggest that somebody should include a detailed description into the readme files what DLLs are actually necessary to run C::B under WinXP and where to download them. Blindly trying out different things without knowing the exact problem is like shooting into darkness.

If this information is not available then the claim that C::B works with XP should be removed. It would avoid false expectations and lots of trouble and wasted time.

Offline benezan

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Installing Code::Blocks Windows XP SP3
« Reply #24 on: April 11, 2023, 04:56:40 pm »
I installed EN VC runtime (UCRT) on PL WinXP:  Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.24.28127, 06/02/2020  15:07:05 .    No problems.

I checked and found out that I already have a newer Redistributable installed on my PC: 14.27.29016
I think it doesn't make sense to uninstall that and re-install the older one, does it.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Installing Code::Blocks Windows XP SP3
« Reply #25 on: April 11, 2023, 06:01:28 pm »
I installed EN VC runtime (UCRT) on PL WinXP:  Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.24.28127, 06/02/2020  15:07:05 .    No problems.

I checked and found out that I already have a newer Redistributable installed on my PC: 14.27.29016
I think it doesn't make sense to uninstall that and re-install the older one, does it.

Note: if the Redistributable does not have UCRT in the description I would guess it would not fix the problem.

I would try replacing the Code::Blocks DLLs if it still has run-time errors.

Tim S.
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 nenin

  • Almost regular
  • **
  • Posts: 201
Re: Installing Code::Blocks Windows XP SP3
« Reply #26 on: April 12, 2023, 07:39:15 am »
I installed EN VC runtime (UCRT) on PL WinXP:  Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.24.28127, 06/02/2020  15:07:05 .    No problems.

I checked and found out that I already have a newer Redistributable installed on my PC: 14.27.29016
I think it doesn't make sense to uninstall that and re-install the older one, does it.
Of course no, you dont need downgrade. UCRT might become  important for usage of the some modern libraries.

Offline nenin

  • Almost regular
  • **
  • Posts: 201
Re: Installing Code::Blocks Windows XP SP3
« Reply #27 on: April 12, 2023, 07:46:06 am »
Note: One person tried the DLLs from here https://github.com/acotty/CodeBlocks_Unofficial_Testing/tree/master/src/exchndl/Win_XP/win32 instead of the old CB DLLs. IIRC, they said it worked.
I've tried those 5 files and it doesn't work for me. I still get the same error message "C:\Programme\CodeBlocks\exchndl.dll is not a valid windows file".
It is strange, I downloaded it:
Code
c:\Users\****\Downloads\exchndl.dll
on x64 Professional Edition Version 10.0 (build 19045)
File Version Information :
Version language : Angielski (Stany Zjednoczone)
      CompanyName : Jose Fonseca
      FileDescription : ExcHndl library.
      FileVersion : 0.8.2
      InternalName : ExcHndl
      LegalCopyright : Copyright 2002-2015 Jose Fonseca
      OriginalFilename : exchndl.dll
      ProductName : Dr. Mingw
      ProductVersion : 0.8.2
Creation Date : 12/04/2023  07:40:20
Last Modif. Date : 12/04/2023  07:40:20
Last Access Date : 12/04/2023  07:41:32
FileSize : 29198 bytes ( 28.514 KB,  0.028 MB )
FileVersionInfoSize : 1436 bytes 
File type : Dynamic Link Library (0x2)
Target OS : Win32 API (Windows NT) (0x40004)
File/Product version : 0.8.2.0 / 0.8.2.0
Language : Angielski (Stany Zjednoczone) (0x409)
Character Set : 1200 (ANSI - Unicode (BMP of ISO 10646)) (0x4B0)

Build Information :
Debug Version : yes
Patched Version : no
Prerelease Version : no
Private Version : yes
Special Build : no
This is exactly the same file I found in C::B 17.12.0.0 distribution.

Offline seahawkibiza

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Installing Code::Blocks Windows XP SP3
« Reply #28 on: April 13, 2023, 02:17:42 pm »
Ok, after reading about the Universal CRT deployment I found the following:

Because it lacks support for SHA-256 code signing certificates, runtime library support for Windows XP is no longer available in the latest Visual C++ Redistributable for Visual Studio 2015, 2017, 2019, and 2022. The last Redistributable to support Windows XP shipped in Visual Studio 2019 version 16.7. Use a Redistributable that has a file version starting with 14.27. If your Windows XP apps are deployed with or updated to a later version of the redistributable, the apps won't run.

The link to the las working download: https://my.visualstudio.com/Downloads?q=Redistributable%20for%20Visual%20Studio%202019%20Version%2016.7

I installed this version on a fresh installation of WinXP-SP3. After this I installed Code::Blocks, but Code::Blocks comes up with an error message (see attachment).

On the other side, Microsoft writes this:
The preferred method to centrally install the Universal CRT is to use Microsoft Windows Update. The Universal CRT is a Recommended update for all supported Microsoft Windows operating systems, so by default, most machines install it as part of the regular update process. The initial release of the Universal CRT was KB2999226. A later update with various bug fixes was made in KB3118401, and there have been more updates with further bug fixes and new features.


Both updates are .msu files, they are only installable under Windows Vista (Trusted Installer). It seems, that this way is impossible.

The last version for WinXP is Visual Studio Express 2010, which you can download on my.visualstudio.com (after registration).
I installed the whole Visual Studio on XP, because in this complete program should be all included.

But after install Visual Studio the same (see attachment 2).

As the last try, I used a fresh Win-XP SP3, installed C::B and downloaded the mentioned dlls. I replaced in the C::B folder and this works perfectly.

The next step is, how to run TDM-32 Compiler on WINXP.







Offline benezan

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Installing Code::Blocks Windows XP SP3
« Reply #29 on: April 13, 2023, 04:10:46 pm »
Arrrgggg!!!! I feel so tired... :-\

The problem was that I tried to download the files at https://github.com/acotty/CodeBlocks_Unofficial_Testing/tree/master/src/exchndl/Win_XP/win32 by right click, save as... But this doesn't download the actual file but an HTML file that has the same name (*.dll) but garbage content. Instead, you have to click on the link which opens another page with a download button. Have I already mentioned that I HATE the github frontend? This is why! (I use GIT every day without problems but no github)

And tadaaa  :D Codeblocks runs fine. I still have some minor issues with some of the plugins but that should be resolvable.

Despite of my dump mistake, I'd still recommend including those files in the official distribution or at least mention where to get them in the readme file.