From: Miller, James V (Research) <millerjv@cr...> - 2004-08-30 19:59:00
If I rememeber correctly (which for this discussion is in doubt), you
can setup Visual Studio to do syntax highlighting of txx files via
a registry edit.
However, the simplest way to get Visual Studio to syntax highlight a
txx file is by setting txx as a C++ filetype in one of the Visual Studio
dialogs. This, unfortunately, not only tells Visual Studio to syntax
highlight a txx file but also to treat the file as compilable C++ code.
So, the easiest way to get Visual Studio to syntax highlight a txx file
ends up with the undesirable and incorrect behavior of trying to compile
the code in the txx file. The developer/user thinks they are getting what
they want but end up with a mess.
From: Amitha Perera [mailto:perera@...]
Sent: Monday, August 23, 2004 11:31 AM
To: William A. Hoffman
Cc: Peter.Vanroose@...; Bill Hoffman;
Subject: Re: [Vxl-maintainers] Re: vcl emulation question
On Mon 23 Aug 2004, William A. Hoffman wrote:
> Nice idea, but once you add .txx as a c++ source file the folder it
> is in does not matter, it will be compiled.
This is going somewhat off the topic, but a .txx file is not compiled
by default. (At least, it isn't with VC6 and VC7.) You have to
explicitly make the compiler think that .txx are compilable. I think
it may involve registry settings.
> I agree it is a bad thing to do, but I was a bit surprised to see
> the emulation stuff as part of the project.
Given your statement, you are probably aware of all this, but I'll
If you, or anyone else, has changed the compiler to treat .txx as a
compilable file, you've probably done the wrong thing unless the
compiler happens to support exported templates. To my knowledge, only
the Comeau (sp?) compiler does this. Even then, your exported template
implementation then should sit in a .cxx file.
Besides, convention has .txx files containing the implementation of a
template. It should not contain any code that causes the template to
be instantiated. This is why is it okay to include your .txx file at
the end of the corresponding .h file if you are going to use implicit
"Compiling" a .txx file should not cause any object code to be
generated. Of course, it will cause symbols to be defined, and in the
specific case of vcl, these symbols could conflict with the correct
system symbols. So there, the correct solution is indeed to never
"see" those files.
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
Vxl-maintainers mailing list