Russell's analysis is dead on. Here is a summary of some bugs that I submitted a
while back regarding how the IDE mis-reads linker switches. All of these bugs seem to
be caused by a malcontent xml parser.
PS: A patch for stuff like this would have been awesome.
------------------------------------------------------------
Bug #1- If the description of a package contains a hyphen, BCB5 erroneously
interprets that hyphen as a linker switch.
Steps to reproduce
-Start BCB5
-File - New Package
-Open the options for the package. On the description tab, enter the following string
into the description box
Claims-design time package
-Click the OK button to save the package options
-Open the project options again
-Go to the advanced linker tab and look at the DLLs to delay load box
-- expected this edit box to be empty
-- in reality, the box contains 'esign'
BCB5 mistakes the -design time package string in the description as the linker flag
-d.
Note: simply deleting the text from the delay loading box does not solve the problem.
The only workaround is to not have hypens in the package description box.
Workaround: he he, don't use hyphens in package names.
--------------------------------------------------------
Bug #2- The linker flag -w-dup supresses linker warnings regarding duplicate
symbols. If this switch is manually added to the LFLAGS parameter in the XML project
file, it is successfully passed to the linker.
However, as soon as I open the Project Options dialog, the -w-dup switch is
intrepreted as -w -dup. The -d switch is for delay loaded dlls, so now the linker
tries to delay load a dll called 'up' on future builds. Needless to say, this causes
a linker error.
Workaround: try using #pragma's to suppress the warning (if its possible)
--------------------------------------------------------
Bug #3- The linker tab of the project options dialog contains a button for adjusting
the warnings that are generated by the linker. The button launches a separate dialog
box that lists various linker warnings in a check list box.
The default value for "Public symbol 'symbol' defined in both module 'module1' and
'module2' (-wdup)" is checked. If I uncheck this box, the IDE inserts an invalid
value for the LFLAGS in the XML project source.
<LFLAGS value="-D"" -aa -Tpe -x -Gn -w-v"/>
Notice how the -w runs right into the -v. When I try to compile this project, I get a
linker error.
[Linker Fatal Error] Fatal: Illegal option: v
--------------------------------------------------------
Bug #4- This bug is similar to bug #3. Unchecking the linker warning
"Image linked as an executable, but with a .DLL or .BPL extension (-wdee)"
Causes the same behavior that was found in bug #3 above. The project XML contains an
invalid option.
<LFLAGS value="-D"" -aa -Tpe -x -Gn -w-v"/>
-------------------------------------------------------
Harold Howe [TeamB]
http://www.bcbdev.com