Board index » cppbuilder » Compilation error when using an ActiveX component

Compilation error when using an ActiveX component

I am getting the compiler error "> expected" on the line:
template <int LEN>

in file :
"\Program Files\Borland\CBuilder4\Include\Vcl\Utilcls.h"

I have 2 projects originally built with Builder3. I originally
recompiled
them using Builder4, and everything worked OK.

I then add an ActiveX component to the main form, and I get the above
error.

I got "around" this error by building a new application, and putting all

the controls on the form (by hand) that are on the original form (same
names, properties, and event handlers). Then I pasted all the code
from my original .cpp file into the new .cpp file, and the above
compiler
error went away.

Project 2 has about 100 (well maybe not quite, but a lot) controls on
the
form, and I would rather not have to recreate the form.

Does anyone know what is going on, and how/what to fix in my project?

Thanks a lot
Bill Montville
BMontvi...@swri.edu

 

Re:Compilation error when using an ActiveX component


Bill, what is the line number? I suspect that LEN is defined in some way
in the ActiveX headers, hence the compiler error.

Alex

Quote
Bill Montville wrote:

[snip]

--
HotSend - portable documents technology
http://www.hotsend.com/
eFax - get your faxes via email - Free !
http://www.efax.com

Re:Compilation error when using an ActiveX component


In article <3831944F.82F50...@jetsuite.com>,
Alex Bakaev [TeamB] <al...@jetsuite.com> wrote:

Quote
>Bill, what is the line number? I suspect that LEN is defined in some way
>in the ActiveX headers, hence the compiler error.

That's got to be line 368, the only place we templatize on that.

I couldn't find anywhere that we define LEN to be something, so I
doubt that's the problem.

Bill: try one of the following.

(1) run through cpp32 and scan down for the first occurance of
'TCharBuff', and see what the preprocessor is giving the compiler
at that point.

(2) change LEN in lines 368 and 378 to be 'LENGTH' or some other
value you are sure is not #defined anywhere.

Quote

>Alex

>Bill Montville wrote:
>[snip]

>--
>HotSend - portable documents technology
>http://www.hotsend.com/
>eFax - get your faxes via email - Free !
>http://www.efax.com

--
Caminante, son tus huellas el camino, y nada mas;
caminante, no hay camino, se hace camino al andar ...
Caminante, no hay camino, sino estelas en el mar.

Re:Compilation error when using an ActiveX component


Robert, LEN is defined by the control, not by you. Or some another
header got included and it does define LEN.

Alex

Quote
aphr...@magescave.blackforest.org wrote:

[snip]

--
HotSend - portable documents technology
http://www.hotsend.com/
eFax - get your faxes via email - Free !
http://www.efax.com

Re:Compilation error when using an ActiveX component


In article <3832FB62.649CE...@jetsuite.com>,
Alex Bakaev [TeamB] <al...@jetsuite.com> wrote:

Quote
>Robert, LEN is defined by the control, not by you. Or some another
>header got included and it does define LEN.

Yeah, that was clear. I just wanted to be sure none of the new
system header files defined it, or whatnot.

You were very quiet at the chat this morning.
--
Caminante, son tus huellas el camino, y nada mas;
caminante, no hay camino, se hace camino al andar ...
Caminante, no hay camino, sino estelas en el mar.

Re:Compilation error when using an ActiveX component


I got in too late. I'm pulling 14 hour days at the moment ;)

a.

Quote
aphr...@magescave.blackforest.org wrote:

> In article <3832FB62.649CE...@jetsuite.com>,
> Alex Bakaev [TeamB] <al...@jetsuite.com> wrote:
> >Robert, LEN is defined by the control, not by you. Or some another
> >header got included and it does define LEN.

> Yeah, that was clear. I just wanted to be sure none of the new
> system header files defined it, or whatnot.

> You were very quiet at the chat this morning.
> --
> Caminante, son tus huellas el camino, y nada mas;
> caminante, no hay camino, se hace camino al andar ...
> Caminante, no hay camino, sino estelas en el mar.

--
HotSend - portable documents technology
http://www.hotsend.com/
eFax - get your faxes via email - Free !
http://www.efax.com

Re:Compilation error when using an ActiveX component


In article <38331E96.16ADC...@jetsuite.com>,
Alex Bakaev [TeamB] <al...@jetsuite.com> wrote:

Quote
>I got in too late. I'm pulling 14 hour days at the moment ;)

Ouch.
I've done that on and off. Last week was particularly bad. :(

--
Caminante, son tus huellas el camino, y nada mas;
caminante, no hay camino, se hace camino al andar ...
Caminante, no hay camino, sino estelas en el mar.

Re:Compilation error when using an ActiveX component


Alex, thanks for the suggestion - I looked at a header file of a product I
am using with this project, and LEN was defined. I made some changes in the
3rd party's header file, and I no longer get the compilation errors.
Thanks, Bill

Quote
"Alex Bakaev [TeamB]" wrote:
> Bill, what is the line number? I suspect that LEN is defined in some way
> in the ActiveX headers, hence the compiler error.

[snip]

Re:Compilation error when using an ActiveX component


Bill, that's nice to know.

Cheers,
Alex

Quote
Bill Montville wrote:

[snip]
--
HotSend - portable documents technology
http://www.hotsend.com/
eFax - get your faxes via email - Free !
http://www.efax.com

Other Threads