Are binaries compiled with Pelle's C compatible with Windows 95?

Started by leandrojardim, April 17, 2017, 11:52:22 PM

Previous topic - Next topic

leandrojardim

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?

frankie

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.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Vortex

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.

Code it... That's all...

DMac

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.
No one cares how much you know,
until they know how much you care.

leandrojardim

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?

TheRaven

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).

leandrojardim

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.

TimoVJL

With poide -x -xml options it is possible to make several environments.
PrjUserEnv Add-In or SelCompiler 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
#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
May the source be with you

leandrojardim