473,547 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compile C program in Visual Studio 2005

Sorry if this sounds stupid. I am a total newbie....

Can I compile C program in Visual Studio 2005 IDE? I wrote the simple
"Hello World" program in it:

------------------------------------

#include <stdio.h>

main()
{
printf("hello, world!\n");
}

--------------------------------------

When I run it, it gives me the following:

-------------------------------------------------------------------------
'HelloWorld2.ex e': Loaded
'D:\VS\Projects \HelloWorld2\de bug\HelloWorld2 .exe', Binary was not built
with debug information.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\ntdll.dll ', No symbols
loaded.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\kernel32. dll', No symbols
loaded.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\apphelp.d ll', No symbols
loaded.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\version.d ll', No symbols
loaded.
The thread 'Win32 Thread' (0x4e8) has exited with code 0 (0x0).
The program '[5968] HelloWorld2.exe : Native' has exited with code 0 (0x0).

-------------------------------------------------------------------------
Any suggestions? Please advice. Thanks a million!

Regards,

Nick
Jan 16 '07 #1
10 27997
Yes you can

The program compiled and lin ked properly. When you created the project
did you create it as a console application. Also run the application
from the command line not inside the ide. inside the ide the program
will end and close the console window.

Nicholas Zhou wrote:
Sorry if this sounds stupid. I am a total newbie....

Can I compile C program in Visual Studio 2005 IDE? I wrote the simple
"Hello World" program in it:

------------------------------------

#include <stdio.h>

main()
{
printf("hello, world!\n");
}

--------------------------------------

When I run it, it gives me the following:

-------------------------------------------------------------------------
'HelloWorld2.ex e': Loaded
'D:\VS\Projects \HelloWorld2\de bug\HelloWorld2 .exe', Binary was not built
with debug information.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\ntdll.dll ', No symbols
loaded.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\kernel32. dll', No symbols
loaded.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\apphelp.d ll', No symbols
loaded.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\version.d ll', No symbols
loaded.
The thread 'Win32 Thread' (0x4e8) has exited with code 0 (0x0).
The program '[5968] HelloWorld2.exe : Native' has exited with code 0 (0x0).

-------------------------------------------------------------------------
Any suggestions? Please advice. Thanks a million!

Regards,

Nick
Jan 17 '07 #2
Scooter wrote:
Yes you can

Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or:
<http://www.caliburn.nl/topposting.html >
Jan 17 '07 #3

"Scooter" <sr********@net scape.comwrote in message
news:11******** **************@ 11g2000cwr.goog legroups.com...
Yes you can

The program compiled and lin ked properly. When you created the project
did you create it as a console application. Also run the application
from the command line not inside the ide. inside the ide the program
will end and close the console window.

Nicholas Zhou wrote:
>Sorry if this sounds stupid. I am a total newbie....

Can I compile C program in Visual Studio 2005 IDE? I wrote the simple
"Hello World" program in it:
You're gonna get flamed if you continue to go on about the details of your
IDE, which has nothing to do with ISO C. At least have a proper main call
which is
int main(void)
There's certainly a NG with the word microsoft in it where you'll find that
your questions find a better response. LS
Jan 17 '07 #4
Nicholas Zhou <zh******@osu.e duwrote:
Sorry if this sounds stupid. I am a total newbie....

Can I compile C program in Visual Studio 2005 IDE? I wrote the simple
"Hello World" program in it:
Yes. Make sure the files have the .c extension instead of .cpp so it
compiles the source as C and not as C++.
#include <stdio.h>

main()
If you write it as
int main(void)
you would remember that you should return something when the function
ends and main returns int.
{
printf("hello, world!\n");
add:

getchar();

so you make sure that the console stays opened until you press Enter.
This way you get to read the output. Make sure you have a console
project.

add:
return 0;

}

--------------------------------------

When I run it, it gives me the following:

-------------------------------------------------------------------------
'HelloWorld2.ex e': Loaded
'D:\VS\Projects \HelloWorld2\de bug\HelloWorld2 .exe', Binary was not built
with debug information.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\ntdll.dll ', No symbols
loaded.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\kernel32. dll', No symbols
loaded.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\apphelp.d ll', No symbols
loaded.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\version.d ll', No symbols
loaded.
The thread 'Win32 Thread' (0x4e8) has exited with code 0 (0x0).
The program '[5968] HelloWorld2.exe : Native' has exited with code 0 (0x0).
The last line says that your program ran and returned with code 0.
--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)

Jan 17 '07 #5

u write the program in console project. that is when u would select the
new project, u select the console application.
u try it and reply to me.
On Jan 17, 6:10 am, Nelu <spamah...@gmai l.comwrote:
Nicholas Zhou <zhou....@osu.e duwrote:
Sorry if this sounds stupid. I am a total newbie....
Can I compile C program in Visual Studio 2005 IDE? I wrote the simple
"Hello World" program in it:Yes. Make sure the files have the .c extension instead of .cpp so it
compiles the source as C and not as C++.
#include <stdio.h>
main()If you write it as
int main(void)
you would remember that you should return something when the function
ends and main returns int.
{
printf("hello, world!\n");add:

getchar();

so you make sure that the console stays opened until you press Enter.
This way you get to read the output. Make sure you have a console
project.

add:
return 0;


}
--------------------------------------
When I run it, it gives me the following:
-------------------------------------------------------------------------
'HelloWorld2.ex e': Loaded
'D:\VS\Projects \HelloWorld2\de bug\HelloWorld2 .exe', Binary was not built
with debug information.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\ntdll.dll ', No symbols
loaded.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\kernel32. dll', No symbols
loaded.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\apphelp.d ll', No symbols
loaded.
'HelloWorld2.ex e': Loaded 'C:\WINDOWS\sys tem32\version.d ll', No symbols
loaded.
The thread 'Win32 Thread' (0x4e8) has exited with code 0 (0x0).
The program '[5968] HelloWorld2.exe : Native' has exited with code 0 (0x0).The last line says that your program ran and returned with code 0.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)- Hide quoted text -- Show quoted text -
Jan 18 '07 #6
madhawi wrote:
u write the program in console project. that is when u would select the
new project, u select the console application.
u try it and reply to me.
Please use proper English words instead of indecipherable abbreviations
like 'u', '4' etc.

Jan 18 '07 #7
madhawi wrote:
>
u write the program in console project. that is when u would select
the new project, u select the console application.
u try it and reply to me.
The combination of rude top-posting and incomprehensibl e geek-speek
makes this a totally useless reply to a patently off-topic
article. Please review the following links before further
disruption of newsgroups.

--
Some informative links:
<http://members.fortune city.com/nnqweb/ (newusers)
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html >
<http://www.netmeister. org/news/learn2quote.htm l>
<http://cfaj.freeshell. org/google/ (taming google)

Jan 18 '07 #8
CBFalconer wrote:
madhawi wrote:
>u write the program in console project. that is when u would select
the new project, u select the console application.
u try it and reply to me.

The combination of rude top-posting and incomprehensibl e geek-speek
makes this a totally useless reply to a patently off-topic
article. Please review the following links before further
disruption of newsgroups.
Could you stop recommending this one:

<http://members.fortune city.com/nnqweb/>

You are telling people to visit a site which contains some links
to somewhere; that "somewhere" is something you have to discover
by clicking those links and getting popups or "Click to skip
advertisement" garbage.

Note, try this link with a virgin browser without any fancy network
settings you told you have. Try it as an innocent guy with mozilla
or IE would do.

By doing this you are doing more harm than good: most people
getting this template response from you simply ignore you (naturally),
but those who do not will get to that garbage site, and will ignore you
too; and they won't try next links even though they are actually not
bad. And as the result you simply add to the "further disruption of
newsgroups".

Regards,
Yevgen
Jan 18 '07 #9
Yevgen Muntyan wrote:
>
.... snip ...
>
Could you stop recommending this one:

<http://members.fortune city.com/nnqweb/>

You are telling people to visit a site which contains some links
to somewhere; that "somewhere" is something you have to discover
by clicking those links and getting popups or "Click to skip
advertisement" garbage.

Note, try this link with a virgin browser without any fancy network
settings you told you have. Try it as an innocent guy with mozilla
or IE would do.

By doing this you are doing more harm than good: most people
getting this template response from you simply ignore you
(naturally), but those who do not will get to that garbage site,
and will ignore you too; and they won't try next links even though
they are actually not bad. And as the result you simply add to the
"further disruption of newsgroups".
I compromised. I moved it to the last of the links. It does lead
to valuable information.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home .att.net>
Jan 19 '07 #10

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

Similar topics

3
2290
by: Shapper | last post by:
Hello, I am starting 2 new projects to deliver in January 2006. I want to create them in Asp.Net 2.0 using Visual Studio 2005. All my clients web sites are Visual Studio 2003 projects in Asp.Net 1.1 / VB.NET. These web sites use Access Databases and NOT Microsoft SQL 2000. In the future I will need to make a few changes now and then to...
5
4028
by: Mads Peter Nymand | last post by:
Hi, Background: I'm a Java programmer new to c# and Visual Studio. Problem: When I compile in Visual Studio 2005, the compiler complains, that it can not find several different namespaces. Examples: Error 1 The type or namespace name 'Soap' does not exist in the namespace 'System.Runtime.Serialization.Formatters' (are you missing an...
5
3930
by: blackdog | last post by:
I have installed Visual Studio 2005, on the CD show Visual Studio 2005 team suite with 3 disks. I used to use Visual studio .NET 2003 and I used command csc.exe to compile csharp program. but in Visual Studio 2005, I could not find csc.exe. Any tip?? Thanks
81
4508
by: Peter Olcott | last post by:
It looks like System::Collections::Generic.List throws and OUT_OF_MEMORY exception whenever memory allocated exceeds 256 MB. I have 1024 MB on my system so I am not even out of physical RAM, much less virtual memory. Are other people experiencing this same problem?
6
16161
by: phnimx | last post by:
I'm attempting to migrate a predominately MFC application that I've just inherited from Visual Studio.NET 2003 to Visual Studio 2005. I've managed to clean up a myriad of compile and link errors but I'm stuck on one final problem. Please note that this application compiled/linked and ran just fine out of Visual Studio.NET 2003. Details:...
3
6045
by: Edwin Smith | last post by:
I have a 2 form project in VS2005 that now hangs whenever I try to do anything with the second form. This seems to have started when I added some SQL tables from a Pervasive v.9 database using the Pervasive ODBC driver. The devenv.exe process hangs and will not respond with about 50% cpu usage and about 100 megs of memory used. I am...
6
2120
by: tharris | last post by:
I am new learning how to use Visual Studio 2005 to program in C++. I have been having trouble deploying my applications onto another computer. I also use the Bloodshed Dev C++ compilier and when I compile my program it creates a exe that I can simply copy onto another computer and it will run. However, with Visual Studio I must create a...
0
6653
by: marathoner | last post by:
I am currently migrating my Visual C++ 6.0 applications to Visual Studio 2005. I am getting compiler errors involving the VS2005's platform SDK. When I removed directory references to that SDK, and started using the Microsoft Platform SDK for XP SP2, the errors disappeared, but I am now getting numerous warnings (macro redefinitions) as...
1
2494
by: Dr T | last post by:
Hi! I downloaded MS Visual Web Developer 2005 Express Edition, MS .NET Framework SDK v2.0, and MS SQL Server 2005. Subsequently, I bought MS Visual Studio 2005 Professional Edition. 1) Are both the MS Visual Web Developer 2005 Express Edition and the MS Visual Studio 2005 Professional Edition used to develop .ASP applications?
0
7507
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7435
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7698
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7461
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7794
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5361
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1922
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.