Board index » cppbuilder » vcl.h is being substituted

vcl.h is being substituted


2005-03-01 01:58:10 AM
cppbuilder22
I have a project using VCL components in particular the combo box. In the .cpp file I have the line:
#include <vcl.h>
When I compile this project on one machine, one of the messages that comes up is:
[C++] Including vcl3.h instead of vcl.h due to -Hr switch
When I compile this project on another computer using all of the same source and project files, the compiler substitues vcl4.h for vcl.h.
This substitutions results in the error
E2015 Ambiguity between 'function1' and 'function2'
Why is the compiler substituting header file? Why does it pick vcl3.h sometimes and vcl4.h other times? How can I turn it off?
I am using Borland C++ Builder 5
 
 

Re:vcl.h is being substituted

"Mel Neil" < XXXX@XXXXX.COM >wrote in message
Quote
This substitutions results in the error
E2015 Ambiguity between 'function1' and 'function2'
Please quote the EXACT error message word-for-word.
Quote
Why is the compiler substituting header file?
Precompiled headers. The IDE detects which controls and units are actually
being used in the project and it then substributes in the appropriate header
file to maximize the use of precompiled headers for the combination of
controls you are using.
Quote
How can I turn it off?
As far as I know, you cannot.
Gambit
 

Re:vcl.h is being substituted

"Remy Lebeau \(TeamB\)" < XXXX@XXXXX.COM >wrote:
Quote
Please quote the EXACT error message word-for-word.
The entire error message was:
[C++ Error] Unit1.cpp(203): E2015 Ambiguity between csDropDown' and 'Stdctrls::csDropDown'
line 203 was:
ComboBox2->Style = csDropDown;
My investigation showed that csDropDown is defined in both StdCtrls.hpp (the definition I should get) and DBLookup.hpp which gets included only when vcl4.h is used instead of vcl.h
I am not using any database controls. The forms in this project are fairly simple with only combo boxes and text boxes.
Why is it that on one computer it substitutes vcl3.h and on others it substitutes vcl4.h? Same code, same project, same version of the compiler.
 

{smallsort}

Re:vcl.h is being substituted

"Mel Neil" < XXXX@XXXXX.COM >wrote in message
Quote
The entire error message was:
[C++ Error] Unit1.cpp(203): E2015 Ambiguity between
csDropDown' and 'Stdctrls::csDropDown'
csDropDown is defined in multiple units, most noteably StdCtrls.hpp and
DbLookup.hpp.
Quote
ComboBox2->Style = csDropDown;
You can fix the ambiguity by doing the following:
ComboBox2->Style = Stdctrls::csDropDown;
Quote
I am not using any database controls.
vcl4.h can be included for other reasons besides database features.
Gambit
 

Re:vcl.h is being substituted

"Remy Lebeau \(TeamB\)" < XXXX@XXXXX.COM >wrote:
Quote
>I am not using any database controls.

vcl4.h can be included for other reasons besides database features.


Gambit


The major question I needed answered was "Why is it including vcl4.h on one machine and vcl3.h on another when both machines are using the same source code, the same project, and running the same version of the compiler?" (C++ Builder 5)
I can find nothing in any setting that seems to affect any of this. Even the BCC32.cfg files seem the same.
Mel Neil
 

Re:vcl.h is being substituted

Hi,
Quote
The major question I needed answered was "Why is it including vcl4.h on one machine and vcl3.h on another when both machines are using the same source code, the same project, and running the same version of the compiler?" (C++ Builder 5)

I can find nothing in any setting that seems to affect any of this. Even the BCC32.cfg files seem the same.
Do there seem to be any problems, in general, with the pch on the
machine where it is different? e.g. check ..\lib for *.csm and *.#??
and check ..\inlcude\vcl for *.hdp.
--Craig
 

Re:vcl.h is being substituted

Craig Farrell < XXXX@XXXXX.COM >wrote:
Quote
Hi,

>The major question I needed answered was "Why is it including vcl4.h on one machine and vcl3.h on another when both machines are using the same source code, the same project, and running the same version of the compiler?" (C++ Builder 5)
>
>I can find nothing in any setting that seems to affect any of this. Even the BCC32.cfg files seem the same.

Do there seem to be any problems, in general, with the pch on the
machine where it is different? e.g. check ..\lib for *.csm and *.#??
and check ..\inlcude\vcl for *.hdp.

--Craig

Craig, I checked the files you indicated. The *.hdp files are identical on both machines. The *.csm and *.#?? files are present and rebuilt each time a full build is done.
However, on the machine that that includes vcl3.h the *.#00 file is 2773KB in size and the *.csm file is 38,479KB in size. The machine that includes vcl4.h the *.#00 file is 3344kb and the *.csm is 13,383kb.
Those sizes to me would seem to be the result of the the different vcl header files not the cause. Is there something else I should look at?