473,418 Members | 2,075 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,418 software developers and data experts.

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.exe': Loaded
'D:\VS\Projects\HelloWorld2\debug\HelloWorld2.exe' , Binary was not built
with debug information.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols
loaded.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols
loaded.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\apphelp.dll', No symbols
loaded.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\version.dll', 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 27981
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.exe': Loaded
'D:\VS\Projects\HelloWorld2\debug\HelloWorld2.exe' , Binary was not built
with debug information.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols
loaded.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols
loaded.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\apphelp.dll', No symbols
loaded.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\version.dll', 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********@netscape.comwrote in message
news:11**********************@11g2000cwr.googlegro ups.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.eduwrote:
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.exe': Loaded
'D:\VS\Projects\HelloWorld2\debug\HelloWorld2.exe' , Binary was not built
with debug information.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols
loaded.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols
loaded.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\apphelp.dll', No symbols
loaded.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\version.dll', 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...@gmail.comwrote:
Nicholas Zhou <zhou....@osu.eduwrote:
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.exe': Loaded
'D:\VS\Projects\HelloWorld2\debug\HelloWorld2.exe' , Binary was not built
with debug information.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols
loaded.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols
loaded.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\apphelp.dll', No symbols
loaded.
'HelloWorld2.exe': Loaded 'C:\WINDOWS\system32\version.dll', 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 incomprehensible 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.fortunecity.com/nnqweb/ (newusers)
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html>
<http://www.netmeister.org/news/learn2quote.html>
<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 incomprehensible 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.fortunecity.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.fortunecity.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

"CBFalconer" <cb********@yahoo.comwrote in message
news:45***************@yahoo.com...
Yevgen Muntyan wrote:
>>
Could you stop recommending this one:

<http://members.fortunecity.com/nnqweb/>

I compromised. I moved it to the last of the links. It does lead
to valuable information.
There's no one in clc who improves the quality of posts more than does
Chuck. Usenet is a strange place, and getting a feel for the territory
helps with the critical task of getting posts in the correct ng. LS
Jan 19 '07 #11

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

Similar topics

3
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...
5
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....
5
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...
81
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...
6
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...
3
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...
6
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...
0
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,...
1
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...
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...
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...
0
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,...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.