Pelles C forum

Pelles C => General discussions => Topic started by: leandrojardim on April 17, 2017, 11:52:22 PM

Title: Are binaries compiled with Pelle's C compatible with Windows 95?
Post by: leandrojardim on April 17, 2017, 11:52:22 PM
Can programs compiled with Pelle's C be executed on old Windows 95 machines too, when the programmer takes care on which Win32 API functions he is using?
Title: Re: Are binaries compiled with Pelle's C compatible with Windows 95?
Post by: frankie on April 18, 2017, 10:06:37 AM
Hello Leandro,
I can't find exactly from which version the transition has begun, but per sure the last versions doesn't support win95 anymore.
The problem is mainly in the libraries that use advanced functions not available in the WIN95 OS.
Title: Re: Are binaries compiled with Pelle's C compatible with Windows 95?
Post by: Vortex on April 18, 2017, 07:58:48 PM
Hi leandrojardim,

That would be possible by replacing the default Pelles C run-time library with a another one but I suspect you could lose significant functionality in some point.

Title: Re: Are binaries compiled with Pelle's C compatible with Windows 95?
Post by: DMac on April 20, 2017, 05:14:57 AM
The pellesc.de main page provides downloads of earlier versions of Pelles C. Years ago I used to support some old win 95 work stations in a lab using Pelles version 4.5.
Title: Re: Are binaries compiled with Pelle's C compatible with Windows 95?
Post by: leandrojardim on April 26, 2017, 09:04:54 PM
Thanks everyone for the answers. I liked specially of the suggestion from DMac. :) Is it possible to install two or more versions of Pelle's C on the same computer? Or do I need to install it on a virtual machine?
Title: Re: Are binaries compiled with Pelle's C compatible with Windows 95?
Post by: TheRaven on June 09, 2017, 06:15:42 AM
I'm pretty sure multiple instances (installations of Peles C) is possible; Peles C is designed to be self-reliant (not needing system paths & variables). You should be okay, but if issue arises you can always make your Peles C installations portable eliminating any system level conflicts in theory if not standard. Install each implementation to a different directory and you should be ready to roll out (C:\PC95\ and C:\PelesC\ for instance).
Title: Re: Are binaries compiled with Pelle's C compatible with Windows 95?
Post by: leandrojardim on June 13, 2017, 12:58:45 AM
Thanks TheRaven. :) I am asking because Pelle's C stores all it's settings in the Windows registry, and I think that the older versions will use the same folder hierarchy than version 8.0, unless there is an option on Pelle's C for it to read and store the settings in a INI file. I do fear that this will generate conflicts between the Pelle's C versions.
Title: Re: Are binaries compiled with Pelle's C compatible with Windows 95?
Post by: TimoVJL on June 13, 2017, 10:45:12 AM
With poide -x -xml options it is possible to make several environments.
PrjUserEnv Add-In (http://forum.pellesc.de/index.php?topic=7053.msg26777#msg26777) or SelCompiler (http://forum.pellesc.de/index.php?topic=3250.0) could be helpful too;)

EDIT:
In my test hello.c compiled and linked with version 8 pocc and polink and with version 4.5 crt.lib worked in Win95 in VirtualBox.

EDIT 2017-06-14: PEImpTest check imports against DEF-files. An example comes with couple WIN95 DEF-files.

Notes:
for header testing
Code: [Select]
#define WINVER 0x0400
#define _WIN32_WINDOWS 0x0400
#define _WIN32_WINNT 0x0399
//#define NTDDI_VERSION 0x0400

#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#define str(s) #s
#define xstr(s) str(s)
#pragma message("WINVER="xstr(WINVER))
#pragma message("_WIN32_WINDOWS="xstr(_WIN32_WINDOWS))
#pragma message("_WIN32_WINNT="xstr(_WIN32_WINNT))
#pragma message("NTDDI_VERSION="xstr(NTDDI_VERSION))
pocrt.dll v.8 was loaded in Win95
Title: Re: Are binaries compiled with Pelle's C compatible with Windows 95?
Post by: leandrojardim on June 15, 2017, 09:50:35 AM
Thanks TimoVJL, simply perfect, I will try it.