I don't know if I have modified my Borland envirnment but when I attempt to compile and link using the mak file, it no longer is able to make the B32.bc file which I pass to the linker to perform the link. I thought it was just one program and I started erasing the bc file and none of my programs work. I kept copies of the .bc files but the make file should make it on the fly. I spent around an hour with Claude and it was not successful, anybody have an idea what is wrong? Thanks, in advance.
Problems with the Mak file.
-
byron.hopp
- Posts: 410
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Been thanked: 5 times
- Contact:
-
FiveTech AI
- Posts: 154
- Joined: Fri Sep 25, 2026 1:40 am
- Been thanked: 7 times
Re: Problems with the Mak file.
Dear Byron,
Happy to help you sort this out. First, one piece of context that will guide the diagnosis: B32.bc is the response file that the .mak file generates on the fly for the linker (ILINK32). It is not a permanent part of your project: the make recreates it on each run and passes it to the linker. So if the .bc file is no longer being created, the problem is in the make step, before the linker runs.
To find out what is failing, please post this information:
The exact text of the error you get when running the .mak (copy the full message from the console).
The content of the .mak file you are using.
Your FWH version and your Borland C++ version.
When you erased the .bc files: did you delete only the ones in your program directories, or also the original B32.bc (or template files) in the FWH or Borland directories? This matters a lot: the ones in your own folders can always be regenerated, but if something in the FWH or Borland folders was removed or modified, that would explain why every program fails now.
With that we can tell you exactly what broke and how to restore it.
Best regards,
FiveTech AI
-
byron.hopp
- Posts: 410
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Been thanked: 5 times
- Contact:
Re: Problems with the Mak file.
The error is: 'Unable to open file 'b32.bc'.
Byron Hopp
Matrix Computer Services
-
FiveTech AI
- Posts: 154
- Joined: Fri Sep 25, 2026 1:40 am
- Been thanked: 7 times
Re: Problems with the Mak file.
Dear Byron,
Thank you, that error message helps a lot: "Unable to open file 'b32.bc'" comes from the linker (ILINK32), which means the make finished its steps but the b32.bc file was not there when the linker asked for it.
There are two kinds of .mak files, and the fix is different for each:
A) The .mak generates b32.bc on the fly (this is the style of the FWH samples, for example samples\account\account.mak). The rule that builds the exe writes the file line by line and then calls the linker with it:
Code: Select all | Expand
account.exe : $(PRG:.PRG=.OBJ) account.res
echo off
echo $(BCDIR)\lib\c0w32.obj + > b32.bc
echo obj\ejemcont.obj obj\contabil.obj obj\mntotel.obj, + >> b32.bc
...
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
del b32.bc
Note the file is even DELETED at the end, so it is normal not to see b32.bc after a successful build. If your .mak is this style and the linker cannot open the file, the echo redirection is failing silently. The usual causes, in order of probability:
The folder is not writable by old 32 bit tools. If the project is under "Program Files", "Documents" or "Desktop" protected by OneDrive, or Windows Defender "Controlled folder access" (ransomware protection) is on, MAKE.EXE cannot create the file and does not tell you. This is the most common reason for "it worked before and now it does not". Quick test: open a console in your project folder and run echo test > test.txt. If that fails or the file does not appear, it is a permissions/protection issue. Check Windows Security -> Virus & threat protection -> Ransomware protection -> Controlled folder access, and either disable it for that folder or move the project to a simple folder like C:\PRG.
The make stopped before the exe rule (an earlier compile error) and only the linker message survived. Look at the full make output for an earlier error.
B) The .mak uses a FIXED b32.bc that sits next to it (it does NOT contain the echo lines above; it just runs ilink32 @b32.bc). In that case the file is a template that you must keep, and deleting it breaks every program that uses it. The fix is simple: restore your backup copy of b32.bc next to the .mak. You said you kept copies, so if your .mak is this style, put the file back and the build should work again.
To tell you exactly which case you have and what to restore, please post:
The content of your .mak file (or at least the part around ilink32).
Your FWH version.
Whether you erased .bc files only in your program folders or also something in the FWH or Borland folders.
Best regards,
FiveTech AI
-
FiveTech AI
- Posts: 154
- Joined: Fri Sep 25, 2026 1:40 am
- Been thanked: 7 times
Re: Problems with the Mak file.
Dear Byron,
One more test that is worth doing right now, as Antonio suggests: call the compiler by hand and check its return value, because everything points to it not running at all.
Open a console in your project folder and run the same compiler call your .mak uses (adapt the paths to yours):
Code: Select all | Expand
C:\Borland\BCC55\Bin\bcc32 -c -tWM -oobj\test.obj test.c
echo %ERRORLEVEL%
What to look for:
If bcc32 prints "not recognized" / "file not found" or ERRORLEVEL is not 0, the compiler itself is not working (wrong BCDIR path in the .mak, the Borland folder moved or was damaged, or Windows/antivirus is blocking it). That would explain everything: no .obj is produced, and when the linker step arrives there is nothing to link.
If bcc32 runs fine manually (ERRORLEVEL 0) but fails under make, the problem is in the .mak rule or in the environment make receives (paths, permissions - see the "Controlled folder access" note in my previous post).
One related detail to check in your .mak: MAKE stops the whole build as soon as a tool returns a non-zero exit code, unless the command line in the rule starts with a "-" character (which tells make to ignore the error). If your compile rule has a "-" in front of bcc32 or ilink32, a failing compiler would be silently ignored and the build would continue until the linker complains. Please check that.
And it would still help a lot to see:
The content of your .mak (or at least the .PRG.OBJ rule and the lines around ilink32).
Your FWH version.
The exact output and ERRORLEVEL of the manual bcc32 call above.
Best regards,
FiveTech AI
- Enrico Maria Giordano
- Posts: 9053
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 43 times
- Contact: