16-bit Compiler and Linker Issues
Linker Error: Fatal:(1,1): DOS error,
ax = 6 General error
This won't be terribly useful but here it is nonetheless: The
only time I have seen this error is when I had a multi-target
project. The main target was a 32-bit Windows GUI app. The other target
was, by accident, a small model 16-bit DOS program. When I removed
the mismatched target, the app was able to link normally.
Resource Compiler Error
in 16-bit: "Expecting resource name or resource type name"
Double click on the error message to open your .rc file as text
and locate the offending line. The line will be a CONTROL statement
for a control on a dialog. At the end of the line you will see four numbers
representing the x, y, width, and height of the control. Following that
you will see ", 0". Remove the comma and trailing 0 and the resource
will compile in either 16 or 32-bits.
Out of Memory Error During
If you receive an "Out of Memory" error during a 16-bit
Win95: You need to modify the DOS property
memory settings for CONAGENT.EXE, CONAGENT.PIF (found in \windows\system)
and/or _DEFAULT.PIF (\windows). Follow these steps:
1. Start Explorer.
2. Locate one of the above files in the \windows\system directory.
3. When over the file click the right mouse button.
4. Choose 'Properties' from the speed menu.
5. Choose the 'Memory' tab.
6. Make sure all memory settings (four of them) are set to 'Auto.'
You may not have all of the above files. If not, modify
whatever files you can find just to be safe.
WinNT: You may be able to get by by just setting
the memory settings for _default.pif to -1. If that doesn't work then try
1. Run PIFEDIT.EXE
2. Fill in the following fields:
Program Filename: CAPDOS32.EXE
Window Title: capdos32
Memory Requirements: (min) -1 (preferred)
EMS: (req) 0 (limit) 4096
XMS: (req) 0 (limit) 4096
Close window on exit: TRUE
3. Save this as CAPDOS32.PIF in your x:\bc5\bin directory.
4. Reboot NT (if you have run BC 5.0 at all since last reboot)
Linker Hangs on NT
This appears to be a bug related to the Priority Boost setting.
The boost can be set via the slider on the compiling status dialog or via
Options | Environment | Process Control. Leave the Proiority
Boost at 0 and the linker should function normally.
In other cases the linker hanging can be as a result of
inadequate system resources and/or inadequate hard disk space. Free up
some hard disk space and try again.
Linker Error - "Unable
to open file xxxxxxx.cpp"
The 16-bit linker cannot handle long pathnames and filenames. You
will have to use the 8.3 filename conventions.
Linker Error - "Error
in Module xxx.cpp"
This is a general error which could be due to many different problems.
In most cases it has nothing to do with 5.0 directly. Some users report
oddities in their source files which caused the error. Another possible
problem is the inclusion of too much debug info. Try turing debug info
off for that particular module.
Double Cursor using TDW in
The double cursor that shows up when you run TDW under Win95 is
due to an anomoly in Win95. This can be resolved by switching video configurations
using TDWINI.EXE (TD Video Configuration). The default is to use TDWGUI.DLL.
Switch this to SVGA.DLL (full screen) to get rid of the ghost cursor. This
problem does not exist in NT.
Errors Linking VDBT in 16-bit
You need to include the proper .lib files. If building a 16-bit
static project then include the following libraries:
If building a 16-bit dynamic project then include the
First you will need to make the bdtawrli library. Make
bc5\source\vdbt\bdtawr\makefile to build the above library. You will need
to set BCROOT and VHOME to your bc5 location (you can set them from the
command line before running make; set BCROOT=c:\bc5).
Works in 32-bit But Crashes in 16-bit
This is probably because the 16-bit IDAPI has not been installed.
You need to specifically install it. On the CD you will find the installation
program in Setup/Idapi16/setup.exe. Run that to install the 16-bit IDAPI.
No Map File Generated for
Turn on name mangling for the map file (Project | Options
| Linker | Map File) and it will appear. If you want an unmangled
map, edit the .r$p file and set the appropriate switches. Then run TLINK
from DOS. Next time you rebuild in the IDE, the .r$p file will be overwitten.
Problems with STL in
The Rouge Wave STL that ships with BC++ 5.0 is designed
for 32-bit. If you plan on doing heavy 16-bit development using STL then
you should get the public domain STL which you can get by clicking here.
General linker errors can be caused by a lot of different things.
For one, 32 bit import libraries created with 4.5x are not compatible with
5.0 and vice versa. If you have import libraries created with 4.x you should
rebuild them in 5.0 before attempting to use them under 5.0. More will
be added to this section as information is gathered.
Linker Error - "Fatal:
Block overflow for block 'BrowserCache' "
In your project's directory you should find a file called TLINK32.INI.
In this file there is an entry _BROWSERCACHESIZE in the DebugTableSizes
section. Increase the value for this item from 0x200 to 0x4000.
Debugger Stops at
This is a bug that snuck in with Patch 1. It has been fixed in
Patch 2. When running under the debugger the app would stop at a breakpoint
before the app became visible. This only happened with Async compiling
off and after applying Patch 1. The solution is to turn Async compiling
on or apply Patch 2.
Watch Window: "Variable
X has been optimized and is not available"
This is not a bug but should still be mentioned here. The BC++ compiler
optimizes variables that are no longer needed. This is a Good Thing(tm)
but the side effect is that you may not be able to inspect certain variables.
If you have variables that you need to inspect for debugging purposes then
make them static and the debugger won't optimize them. You will want to
remove the static modifier after debugging that section of code. You can
also set 'Register Variables' to 'none' under Options | Project | Compiler
| Code Generation.
BC++ 5.0 FAQ Page | BC++ 5.0