I cannot know for sure what the problem is because I am no working with your
code and build environment.
My guesses and ideas are:
The fixup problem might stem from the -a2 compile option.
Double check the reasons your need that and consider
implementing it in a manner which encases any structures
that are the issue instead of globally forcing it.
bcc @options.cfg etc
really should be
bcc +options.cfg etc
-RT- and -x- are used but noehL.lib is not used. Add noehl
to the library list before any other compiler-supplied libraries.
This effects size and performance and is not a source of the
problems you report.
I would like to see you try a build without -Od and without
-1 (independent items, no intended implication that they
have a special effect when combined) Note that there
are -O1 and -O2 alternatives to select from (also note that
I used -Od for years and am not saying it is a guaranteed
problem)
I don't remember offhand all the details of -dc, -Ff=2000 and
-mm! Double check them and why they are used. Take care
to validate the reason the number given to -Ff is 2000
As for the multiple definition errors, what you show suggests that the way
you are providing the library is actually as a set of object files and not
as a *.lib file. Any duplicate symbols found in object files explicitly
given to the linker will be and should be an error.
It might be a good idea to create a library containing the object files that
are built outside of the project. Maybe something like this might work
better (just typed in - beware of typos). Don't fall back on NIH. Try it,
defer complaining about it until you see the results :-)
----------------------------------------
.autodepend
LIBOBJS= \
c:\projects\plm\src23\pc_obj\appl.obj \
c:\projects\plm\src23\pc_obj\init.obj \
c:\projects\plm\src23\pc_obj\Analog.obj \
c:\projects\plm\src23\pc_obj\Auto_spl.obj \
c:\projects\plm\src23\pc_obj\Delamin.obj \
c:\projects\plm\src23\pc_obj\Diag.obj \
c:\projects\plm\src23\pc_obj\err_str.obj \
c:\projects\plm\src23\pc_obj\events.obj \
c:\projects\plm\src23\pc_obj\evt_gen.obj \
c:\projects\plm\src23\pc_obj\History.obj \
c:\projects\plm\src23\pc_obj\Length.obj \
c:\projects\plm\src23\pc_obj\Len_cntl.obj \
c:\projects\plm\src23\pc_obj\Len_eval.obj \
c:\projects\plm\src23\pc_obj\len_util.obj \
c:\projects\plm\src23\pc_obj\L_opi.obj \
c:\projects\plm\src23\pc_obj\L_table.obj \
c:\projects\plm\src23\pc_obj\Monitor.obj \
c:\projects\plm\src23\pc_obj\plm_evt.obj \
c:\projects\plm\src23\pc_obj\queue.obj \
c:\projects\plm\src23\pc_obj\Relay_io.obj \
c:\projects\plm\src23\pc_obj\repeat.obj \
c:\projects\plm\src23\pc_obj\Report.obj \
c:\projects\plm\src23\pc_obj\rewinder.obj \
c:\projects\plm\src23\pc_obj\Speed.obj \
c:\projects\plm\src23\pc_obj\Status.obj \
c:\projects\plm\src23\pc_obj\Tension.obj \
c:\projects\plm\src23\pc_obj\unwinder.obj \
c:\projects\plm\src23\pc_obj\unw_plm.obj \
c:\projects\plm\src23\pc_obj\Upload.obj \
c:\projects\plm\src23\pc_obj\Utils.obj \
c:\projects\plm\src23\pc_obj\wash_dry.obj \
c:\projects\plm\src23\pc_obj\L_disply.obj \
c:\projects\plm\src23\pc_obj\Control.obj \
c:\projects\plm\src23\pc_obj\Sim_8904.obj \
c:\projects\plm\src23\pc_obj\ten_stab.obj \
c:\projects\plm\src23\pc_obj\Urc2_sim.obj
runonpc.exe : link.rsp LibName.lib pc_obj\my_file.obj
Tlink @link.rsp
link.rsp :
copy &&|
-v -LC:\BC45\LIB;c:\urc\kernel23\bc_lib\ -c -Tde -M -s +
c0L pc_obj\my_file.obj
runonpc,,libname runonpc noehL emu mathL cL
| link.rsp
pc_obj\my_file.obj : options.cfg .\my_file.cpp
bcc +options.cfg -opc_obj\my_file.obj my_file.cpp
options.cfg :
copy &&|
-c -W- -R -v -vi -dc- -1 -w-rch -H- -x- -RT- -mm! -Od -N -ff- -R -ml
-f -dc -Ff=2000
-IC:\BC45\INCLUDE;C:\URC\KERNEL23\DISPLAY;C:\URC\KERNEL23
-D__TARGET_ENVIRONMENT__=__PC_DEBUG__
|
libname.lib : $(LIBOBJS)
tlib /C libname.lib @&&|
+c:\projects\plm\src23\pc_obj\init.obj &
+c:\projects\plm\src23\pc_obj\Analog.obj &
+c:\projects\plm\src23\pc_obj\Auto_spl.obj &
+c:\projects\plm\src23\pc_obj\Delamin.obj &
+c:\projects\plm\src23\pc_obj\Diag.obj &
+c:\projects\plm\src23\pc_obj\err_str.obj &
+c:\projects\plm\src23\pc_obj\events.obj &
+c:\projects\plm\src23\pc_obj\evt_gen.obj &
+c:\projects\plm\src23\pc_obj\History.obj &
+c:\projects\plm\src23\pc_obj\Length.obj &
+c:\projects\plm\src23\pc_obj\Len_cntl.obj &
+c:\projects\plm\src23\pc_obj\Len_eval.obj &
+c:\projects\plm\src23\pc_obj\len_util.obj &
+c:\projects\plm\src23\pc_obj\L_opi.obj &
+c:\projects\plm\src23\pc_obj\L_table.obj &
+c:\projects\plm\src23\pc_obj\Monitor.obj &
+c:\projects\plm\src23\pc_obj\plm_evt.obj &
+c:\projects\plm\src23\pc_obj\queue.obj &
+c:\projects\plm\src23\pc_obj\Relay_io.obj &
+c:\projects\plm\src23\pc_obj\repeat.obj &
+c:\projects\plm\src23\pc_obj\Report.obj &
+c:\projects\plm\src23\pc_obj\rewinder.obj &
+c:\projects\plm\src23\pc_obj\Speed.obj &
+c:\projects\plm\src23\pc_obj\Status.obj &
+c:\projects\plm\src23\pc_obj\Tension.obj &
+c:\projects\plm\src23\pc_obj\unwinder.obj &
+c:\projects\plm\src23\pc_obj\unw_plm.obj &
+c:\projects\plm\src23\pc_obj\Upload.obj &
+c:\projects\plm\src23\pc_obj\Utils.obj &
+c:\projects\plm\src23\pc_obj\wash_dry.obj &
+c:\projects\plm\src23\pc_obj\L_disply.obj &
+c:\projects\plm\src23\pc_obj\Control.obj &
+c:\projects\plm\src23\pc_obj\Sim_8904.obj &
+c:\projects\plm\src23\pc_obj\ten_stab.obj &
+c:\projects\plm\src23\pc_obj\Urc2_sim.obj
|
----------------------------------------
. Ed
Quote
JackRosenbloom wrote in message
news:429f0868$ XXXX@XXXXX.COM ...
Hi Ed,
Thanks for your feedback. I believe I doing the equivalent to your
suggestions. My command lines are too long requiring response files.
Here's exactly what I am doing:
*********** COMPILE *******************
I have a file called options.cfg which contains a single physical line
(email broke this into multiple lines)
-c -W- -R -v -vi -dc- -1 -a2 -w-rch -H- -x- -RT- -mm! -Od -N -ff- -R -ml -f
-dc -Ff=2000 -IC:\BC45\INCLUDE;C:\URC\KERNEL23\DISPLAY;C:\URC\KERNEL23 -D__TARGET_ENVIRONMENT__=__PC_DEBUG__
bcc @options.cfg -opc_obj\my_file.obj my_file.cpp
***************** LINK *************************
I have a file called link.rsp
-v -LC:\BC45\LIB -c -Tde +
c:\bc45\lib\c0l.obj +
c:\projects\plm\src23\pc_obj\appl.obj +
c:\projects\plm\src23\pc_obj\init.obj +
c:\projects\plm\src23\pc_obj\Analog.obj +
c:\projects\plm\src23\pc_obj\Auto_spl.obj +
c:\projects\plm\src23\pc_obj\Delamin.obj +
c:\projects\plm\src23\pc_obj\Diag.obj +
c:\projects\plm\src23\pc_obj\err_str.obj +
c:\projects\plm\src23\pc_obj\events.obj +
c:\projects\plm\src23\pc_obj\evt_gen.obj +
c:\projects\plm\src23\pc_obj\History.obj +
c:\projects\plm\src23\pc_obj\Length.obj +
c:\projects\plm\src23\pc_obj\Len_cntl.obj +
c:\projects\plm\src23\pc_obj\Len_eval.obj +
c:\projects\plm\src23\pc_obj\len_util.obj +
c:\projects\plm\src23\pc_obj\L_opi.obj +
c:\projects\plm\src23\pc_obj\L_table.obj +
c:\projects\plm\src23\pc_obj\Monitor.obj +
c:\projects\plm\src23\pc_obj\plm_evt.obj +
c:\projects\plm\src23\pc_obj\queue.obj +
c:\projects\plm\src23\pc_obj\Relay_io.obj +
c:\projects\plm\src23\pc_obj\repeat.obj +
c:\projects\plm\src23\pc_obj\Report.obj +
c:\projects\plm\src23\pc_obj\rewinder.obj +
c:\projects\plm\src23\pc_obj\Speed.obj +
c:\projects\plm\src23\pc_obj\Status.obj +
c:\projects\plm\src23\pc_obj\Tension.obj +
c:\projects\plm\src23\pc_obj\unwinder.obj +
c:\projects\plm\src23\pc_obj\unw_plm.obj +
c:\projects\plm\src23\pc_obj\Upload.obj +
c:\projects\plm\src23\pc_obj\Utils.obj +
c:\projects\plm\src23\pc_obj\wash_dry.obj +
c:\projects\plm\src23\pc_obj\L_disply.obj +
c:\projects\plm\src23\pc_obj\Control.obj +
c:\projects\plm\src23\pc_obj\Sim_8904.obj +
c:\projects\plm\src23\pc_obj\ten_stab.obj +
c:\projects\plm\src23\pc_obj\Urc2_sim.obj
runonpc.exe,runonpc.map
c:\urc\kernel23\bc_lib\runonpc.lib +
emu.lib + mathl.lib + cl.lib
Tlink @link.rsp
****************************************
Also, I wasn't clear describing one of the errors. The only duplication
of symbols between the library and my application code is functions, not
variables. I have re-defined some functions to use instead of the
library's copy of these functions. The library source code containing the
redefined functions also contain other functions which are not re-defined
and needed. When built from the IDE, this works fine. The required
functions not in the application are taken from the library, the balance
from the application.
I am running this on a winXP machine with 1 GB of RAM. I deleted the
object files and re-building doesn't change anything.
Any other ideas?