Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VC++ compile .cc file extension

0 views
Skip to first unread message

William Wei Liong Young

unread,
Nov 21, 1997, 3:00:00 AM11/21/97
to

Greetings,

I am porting some s/w from unix to windows NT right now. All of our C++
files currently have the extension .cc. I cannot seem to figure out how
to force VC++ to compile .cc files (without having to use Custom Build).

btw, I have associated .cc files to be C++ files in NT itself, but the
association did not carry over into other apps.

When i do a help search in VC++ the only thing i find is a "File Extension
Key" topic, which talked about registry entries. It doesn't really tell
you how to do anything though. I am a unix nut at heart, and have just
started using Windows, so it may have just gone over my head.

I am using NT4.0, and VC++5.

any helps or hints would be great,
-will

btw. I know i could always just rename all my files...but that would be
too easy :)

Carl Verner Skou

unread,
Nov 22, 1997, 3:00:00 AM11/22/97
to

In article <654pm9$m22$1...@nnrp.cs.ubc.ca>, i0...@ugrad.cs.ubc.ca says...

>btw. I know i could always just rename all my files...but that would be
>too easy :)

<*GRIN*>, have you tried to enter the following (not tested) in the
reg-database:

Under HKEY_CLASSES_ROOT
cc

Set
default=cppfile

Yours Carl Verner Skou


Pete Barrett

unread,
Nov 23, 1997, 3:00:00 AM11/23/97
to

On 21 Nov 1997 20:07:37 GMT, i0...@ugrad.cs.ubc.ca (William Wei Liong Young)
wrote:

>Greetings,
>
>I am porting some s/w from unix to windows NT right now. All of our C++
>files currently have the extension .cc. I cannot seem to figure out how
>to force VC++ to compile .cc files (without having to use Custom Build).
>
>btw, I have associated .cc files to be C++ files in NT itself, but the
>association did not carry over into other apps.
>

You might try looking at the files Properties (not Settings) within the project.
The input and output tabs have the names of the compiler associated with the
file, as does the dependencies. What effect changing it would have, I don't
know....

Pete Barrett

Nat Pryce

unread,
Nov 27, 1997, 3:00:00 AM11/27/97
to

Unfortunately, VC++ doesn't take any notice of that registry
setting. I specify the command to execute with a .obj.cc:
declaration in my makefile.

E.g, something like:

.obj.cc:
$(CPP) $(CPPFLAGS) $< /OUT:$@

The variabls CPP and CPPFLAGS have default settings, but one usually
overrides CPPFLAGS to contain project-specific options, definitions
etc.

Also, you can get the editor to highlight C++ syntax of .cc files
by following these steps:

1.Exit from DevStudio.
2.Using the registry editor, open the key:

HKEY_CURRENT_USER
Software
Microsoft
DevStudio
5.0
Text Editor
Tabs
Language Settings

Subkeys of this key hold parameters for each language
understood by DevStudio. To change the file-extensions
for a language, open the key for that language and edit
the string value named "FileExtensions". This value is
a list of file-extensions separated by semicolons.
3.Add any extensions that you want DevStudio to recognise to the
list.
4.Restart DevStudio. It will now understand any new file-extensions
you added.

Cheers,
Nat.

--
+------------------------------------------+---------------------+
| Name: Nat Pryce MEng ACGI | Dept. of Computing, |
| Email: n...@doc.ic.ac.uk | Imperial College, |
| Tel: +44 (0)171 594 8394 | 180 Queen's Gate, |
| Fax: +44 (0)171 581 8024 | London SW7 2BZ, |
| WWW: http://www-dse.doc.ic.ac.uk/~np2 | United Kingdom |
+------------------------------------------+---------------------+

William Wei Liong Young

unread,
Nov 27, 1997, 3:00:00 AM11/27/97
to

: Unfortunately, VC++ doesn't take any notice of that registry

: setting. I specify the command to execute with a .obj.cc:
: declaration in my makefile.

: E.g, something like:

: .obj.cc:
: $(CPP) $(CPPFLAGS) $< /OUT:$@


So I guess there is no real way to do this within the actual Development
environment?

: Also, you can get the editor to highlight C++ syntax of .cc files
: by following these steps:

[...snip...instructions...]

thanks for this *BONUS* tip, I was wondering that as well. After I changed
the registry entry for the editor, I went 'searching' through the rest
of the registry to find a place where I may add the .cc extension.

I added it to: ..... Tools -> 32 bit C/C++ compiler -> Input spec

but that didn't seem to do anything either.

Thanks for your help Nat,
Will


0 new messages