15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


VC4.0 & .C vs .CPP

James Finnigan -- james.finnigan@xilinx.com
Thursday, January 25, 1996

I am using the VC4.0 IDE and would like to know how to compile files with extensions of ".c" using the CPP
compiler and not the C compiler.  Renaming the file extension to .CPP is not a solution for me.  The VC4.0
IDE does not allow the use of the /Tp switch for files within projects.  The /Tp switch is available only as a
command line switch.  

My current workaround is to rename the c1xx.exe to c1.exe.  This does work but seems harsh for a
common need.  Any suggestions & examples would be helpful.

jaf




Mike Blaszczak -- mikeblas@interserv.com
Sunday, January 28, 1996

[Mini-digest: 2 responses]

On Thu, 25 Jan 1996, James Finnigan  wrote:
>My current workaround is to rename the c1xx.exe to c1.exe.  This does work 
>but seems harsh for a
>common need.  Any suggestions & examples would be helpful.

Since whacky solutions don't appear to bother you, why not take all of your 
files and mirror them with CPP files?  That is, if you have MAIN.C, then you 
could create a MAIN.CPP that just has #include  in it.

Of course, the _real_ solution is to name your source files correctly.

.B ekiM
--
TCHAR szDisc[] = _T("These words are my own; I do not speak for Microsoft.");

-----From: mikeblas@interserv.com

On Thu, 25 Jan 1996, James Finnigan  wrote:
>I am using the VC4.0 IDE and would like to know how to compile files with 
>extensions of ".c" using the CPP
>compiler and not the C compiler.  Renaming the file extension to .CPP is not 
>a solution for me. 

Why?  It's the easiest solution.  "I'd like my apartment to be brighter, but 
buying light bulbs isn't a solution for me."

>The VC4.0
>IDE does not allow the use of the /Tp switch for files within
>projects.  The /Tp switch is available only as a
>command line switch.  

There was some traffic on the list about this earlier this year.  This is a 
bug in the IDE.  Maybe it will be fixed in a future version of the IDE.

>My current workaround is to rename the c1xx.exe to c1.exe.  This does work 
>but seems harsh for a
>common need.

I'd probably use words different than "harsh"; I'd pick something more 
appropriate, like "dangerous" or "crazy".

.B ekiM
--
TCHAR szDisc[] = _T("These words are my own; I do not speak for Microsoft.");





| Вернуться в корень Архива |