Board index » cppbuilder » Options being corrupted

Options being corrupted

In my project options I have this

value="-vGc -vGt -vGd -Od -H=smartdoc.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y
      -vi- -c -tW -tWM"/>
    <PFLAGS value="-$YD -$W -$O- -v -JPHNE -M"/>
    <RFLAGS value=""/>
    <AFLAGS value="/mx /w2 /zi"/>
value="-w-dup -w-dpl -D&quot;&quot; -H:0x200000 -S:0x200000 -aa -Tpe -x -Gn

If I go into Project->Options and hit the OK button without changing
anything it changes to this.

value="-vGc -vGt -vGd -Od -H=smartdoc.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y
      -vi- -c -tW -tWM"/>
    <PFLAGS value="-$YD -$W -$O- -v -JPHNE -M"/>
    <RFLAGS value=""/>
    <AFLAGS value="/mx /w2 /zi"/>
value="-dup -dpl -D&quot;&quot; -H:0x200000 -S:0x200000 -aa -Tpe -x -Gn -w-d
up -v"/>  *****changed here

sometimes it changes to

value="-dup -dpl-dpl -dpl -dpl -dpl -dpl  -D&quot;&quot; -H:0x200000 -S:0x20
0000 -aa -Tpe -x -Gn -w-dup -v"/>  *****changed here

What's wrong.  Then I compile and get delayed load module up not found and
delay load mudule pl not found.  Then I fix it and re-compile and I get the
same errors after a while and I didn't change anything.  Why does it change
it on it's own??


Re:Options being corrupted

Someone at Borland wrote a {*word*99}py XML parser and it can't read in the
'disable duplicate ... warning' correctly.   I put in a bug report about
this just after BCB5 was released, but just got a 'please re-submit' message
so know one actually saw it.

The option is -w-dup but seems to be passed twice.  Once as -w-dup
(correctly) then incorrectly as -dup which is delay load of DLL up.dll which
doesn't exist.
Just goes to show that no-one actually tested this at Borland.  Don't expect
this to be fixed, though.


Re:Options being corrupted

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

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&quot;&quot; -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&quot;&quot; -aa -Tpe -x -Gn -w-v"/>


Harold Howe [TeamB]

Other Threads