How to create a project in MS Visual Studio 2005?
Background:
When Visual Studio is clicked for 1st time, click on Run Program(if it is Vista) and click on "Visual C++" so that Visual C++ Settings are made.
Attached documents:
1. Project file created. Just click on " HelloWorld.vcproj" file - it opens the project
2. Image shows how the IDE looks when the "Hello World.c" file is added.
When Visual Studio opens:
1. File - > New Project -> Choose Visual C++ on left pane -> Click on "Win32 Console Application" on the right pane.
2. Enter the location:
ex: C:\SourceCodeProjects
and name of the project under Name field:
ex: HelloWorld
3. Click "OK"
4. Press "Next" in the wizard dialog.
5. Click on "Empty Project" under "Additional options". Press Finish
6. Go to the following location where the project is created.
ex:
C:\SourceCodeProjects\HelloWorld2\HelloWorld2
7. Create "HelloWorld.c" file with Hello-World program.
(i) Right click on "Source Files" (hich is shown under the project in Visual Studio 2005). Click on "Existing Item" under context menu. Click Add.
OR
(ii) Drag and drop this program on the left pane where "Source Files" is shown under the project in Visual Studio 2005.
8. Click on Build Solution
(You can remove the following 2 lines.
int global_int;
#define GLOBALS 1
It just shows how the left pane helps in navigating and seeing the code at exact location.
How to debug?
1. Press breakpoint by pressing F9.
2. You can now click away at F10 (Step Over), F11 (Step Into) and F5 (Continue)
Happy Programming!!
When Visual Studio is clicked for 1st time, click on Run Program(if it is Vista) and click on "Visual C++" so that Visual C++ Settings are made.
Attached documents:
1. Project file created. Just click on " HelloWorld.vcproj" file - it opens the project
2. Image shows how the IDE looks when the "Hello World.c" file is added.
When Visual Studio opens:
1. File - > New Project -> Choose Visual C++ on left pane -> Click on "Win32 Console Application" on the right pane.
2. Enter the location:
ex: C:\SourceCodeProjects
and name of the project under Name field:
ex: HelloWorld
3. Click "OK"
4. Press "Next" in the wizard dialog.
5. Click on "Empty Project" under "Additional options". Press Finish
6. Go to the following location where the project is created.
ex:
C:\SourceCodeProjects\
7. Create "HelloWorld.c" file with Hello-World program.
(i) Right click on "Source Files" (hich is shown under the project in Visual Studio 2005). Click on "Existing Item" under context menu. Click Add.
OR
(ii) Drag and drop this program on the left pane where "Source Files" is shown under the project in Visual Studio 2005.
8. Click on Build Solution
(You can remove the following 2 lines.
int global_int;
#define GLOBALS 1
It just shows how the left pane helps in navigating and seeing the code at exact location.
How to debug?
1. Press breakpoint by pressing F9.
2.
No comments:
Post a Comment