473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Compile .c file as C++ in MS Studio

Hello everyone,

Can anybody help me how can I compile of my *.c files as c++? I see
that by default MS Visual Studio compiles the *.c files assuming C
source. How can I instruct the compiler to compile it as C++ source?

Thanks in advance
AR
Jul 22 '05 #1
3 1582

"AR John" <ar********@yahoo.com> skrev i en meddelelse
news:c0**************************@posting.google.c om...
Hello everyone,

Can anybody help me how can I compile of my *.c files as c++? I see
that by default MS Visual Studio compiles the *.c files assuming C
source. How can I instruct the compiler to compile it as C++ source?

Thanks in advance
AR

You should ask this question in a newsgroup dedicated to your compiler -
here it is off-topic. Try microsoft.public.vc.language.

/Peter
Jul 22 '05 #2
AR John wrote:
Hello everyone,

Can anybody help me how can I compile of my *.c files as c++? I see
that by default MS Visual Studio compiles the *.c files assuming C
source. How can I instruct the compiler to compile it as C++ source?

Thanks in advance
AR


http://www.parashift.com/c++-faq-lit...t.html#faq-5.9
Try comp.os.ms-windows.programmer.* or something.

--
Lionel B

Jul 22 '05 #3
The following CL command line specifies that TEST1.c, TEST2.cxx, TEST3.huh,
and TEST4.o are compiled as C++ files, and TEST5.z is compiled as a C file.

CL TEST1.C TEST2.CXX TEST3.HUH TEST4.O /Tc TEST5.Z /TPJust how to do this in
the dev env depends on version."AR John" <ar********@yahoo.com> wrote in
message news:c0**************************@posting.google.c om...
Hello everyone,

Can anybody help me how can I compile of my *.c files as c++? I see
that by default MS Visual Studio compiles the *.c files assuming C
source. How can I instruct the compiler to compile it as C++ source?

Thanks in advance
AR

Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mario T. Lanza | last post by:
I am working with Visual Studio. The solution I am developing is composed of about 8 separate projects. Some of these projects represent different tiers in the N-tiered architecture (data,...
9
by: Brian | last post by:
Greetings: I am trying to compile the following code via command line. It compiles just fine in visual studio 2002 v7 so i took looked at the properties and i got the following command line...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
3
by: Andrew Luke | last post by:
Hi all you C++ guru's! I'm 'very, very' new to C++ and I'm having a little trouble configuring my VS environment I think - when I try and compile some sample code I'm getting the following...
2
by: Qiao Yun | last post by:
I used vc++.net (visual studio .net ) to open a project which can work well in vc++6.0. I succeeded in compiling the project in vc++.net in release mode . But when I tried to compile the project...
6
by: Joachim | last post by:
I have the following simple program: #include <iostream> #include <map> #include <string> #include <sstream> #include <fstream> #include <vector> using namespace std;
1
by: Raterus | last post by:
Hi, Is there a way I can see what commands VS.net is using to compile my asp.net projects? I'm sure its using the vbc/csc programs, but I'd love to see the command-line options it is using. ...
2
by: sarojanand | last post by:
Hi, I have created a project (abc) in my wwwroot folder on my system. From visual studio, i am able to run and view this page. Now I have deployed on wwwroot folder and for this I have edited...
1
by: electrixnow | last post by:
Help!, I need to compile this code with static libs so it run on another XP machine that does'nt have MS Studio installed. When I compile now I get an ERROR: 1>------ Rebuild All started:...
7
by: QiongZ | last post by:
Hi, I just recently started studying C++ and basically copied an example in the textbook into VS2008, but it doesn't compile. I tried to modify the code by eliminating all the templates then it...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.