| Create a standalone .exe |
To make a program as self-contained as possible (that is, outside of
the need to include the BDE or various ActiveX controls you may need),
you can do the following...
- Project | Options | Linker | Use dynamic RTL - uncheck
- Project | Options | Packages | Use runtime packages - uncheck
This ensures that the run-time library and the packages you use are all
statically linked.
However, if you use the BDE, that will need to be included in your installation,
as will any ActiveX controls, databases, or supporting software.
|
BCB 4 and up |
1/15/01 |
| Project tries to link files not part
of the project |
Check the makefile SPARELIBS=
and delete any unneeded entries. Deleting from LIBRARIES= will not work |
All versions |
9/30/98 |
| Projects keep asking for
static libraries or other units or .obj or packages. Where are they from? |
Try the above, first. If that works, but the next new project you create
has the problem...
Check the default.bpr in $(BCB)\bin
You may have to edit this file and delete entries in SPARELIBS= (you cannot
remove directly from LIBRARIES=, remove from SPARELIBS and LIBRARIES entries
will be deleted).
Be careful and make a backup.
Don't delete entries under SPARELIBS that are still needed.
You probably cannot open this file in the IDE. Use Notepad or Wordpad.
|
All versions |
10/1/98 |
| A .dcr file was created
for my component, but it doesn't show up in the project or on the palette |
After creating the .dcr file, remove the component from its project and
then readd it. The .dcr file will show up. Then remake the component project.
Alternatively, hand edit the component project .cpp and add USERES("componentname.dcr")
where componentname is the name of your component. It is best to add this
right after the USEUNIT for the component.
|
All versions |
10/7/98 |
| My changes don't show up
when I run my program but the source looks OK |
This is a fairly well-known
problem and stems from something in the incremental link process going wrong.
You can check if this is the case by trying to delete the *.il* files when
the IDE has this problem. If it tells you the files are locked (i.e. by
the IDE) you are having the problem. Do a File | Close All, delete the project
*.il* files from Windows Explorer, reopen your project and do a make. If
this is not the problem but you are not getting changes from a static linked
component library, after making changes to your component, go to the project
source and put a space character in, backspace, then save all and make.
That forces a relink which otherwise doesn't always happen. |
BCB 3 |
5/24/99 |
| Want to move your project files? |
If files used by your project reside in
any directory other than your project directory, the project manager keeps
the root-relative path to those files at the top of the Project Source (Projectname.cpp)
in the USEFORM and USEDATAMODULE macros. Change the paths in those macros
appropriately, then do a File/Save All. Then exit C++ Builder and edit the
.mak / .bpr / .bpk file; change the paths used to search from the old path
to the moved files to the new path (or the link will fail). But beware,
I have not yet found a way to tell the repository about a move, so you will
need to replace any moved repository components after the move.
But, if you have too many projects depending on the old location, use Windows
shortcuts to pretend the new directory is in the location of the old one:
After you move your files, but before you run BCB, in Windows Explorer go
to the directory above the directory where the files used to be.
Delete the directory where the files used to be.
In the right hand pane of Explorer use the right button to invoke the popup
menu and pick New | Shortcut; type the absolute path to your new directory
- this makes the shortcut point to that directory; call the shortcut the
name of the old directory. Note - you can't use "Browse" to find the new
directory, because it wants you to pick a file, not a directory.
Run BCB.
All of the projects should find the new directory via the shortcut. They
think they're working in the old directory, but they're working in the new
one. |
All versions |
Original
Updated 3/6/98 |
| Annoyed by the IDE forcing
relative paths in the Project | Options | Directory for new projects? |
Change $(BCB)\bin\default.bpr
in Notepad or Wordpad. Set all relative paths to the desired absolute paths. |
BCB 3 and 4 |
8/99 |
| Getting linker warnings
about doubly defined entry points after creating a new component? |
Make sure your component unit
isn't shown in the Project Manager. Once it's a component, the obj for your
component links in from the component library, so having it in your project
brings the obj in twice (and thus, the entry points). |
|
|
| Having strange crashes and
error messages at compile, link, or run time? |
Check to make sure you have
enough disk space available; 10-20 Mb is the minimum required. Also, check
your Project / Options / Linker / Stack Size - the default setting is may
be too low; try 0x00300000 (min) and 0x00350000 (max) for large projects
(300+ controls, multiple forms, multiple data modules with 10-20 table,
source and query objects in each), and 0x00128000 (min) and 0x135000 (max)
for intermediate projects (about half the large size). (These numbers were
derived during the evolution of an application when the linker stack size
settings seemed to have stopped working - your mileage may vary.) |
|
|