Skip to main content
GameDev.net gamedev.net
🔒 Locked

how do I make VC++2005 Win32 app?

Started by synth_cat Jun 17, 2006 at 3:22 PM 16 replies 1.8k views
Original Post
synth_cat
synth_cat
I just installed VC++2005, making a switch from VC++6, and I am a little bewildered. I went to the "New Project" option, and I can't figure out how to create a simple Win32 application just like a used to; all I can figure out how to do is to make a Win32 Console Application, which is obviously not what I want to do. I have looked around online at Microsoft's help files, and they have not been very helpful. Can anyone help me out? All I want to do is to create a Win32 applicaiton, link to my directx9 lib files, copy my old c++ code from my VC++6 projects, and compile. Is this possible, and how do I do it?
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
Trip99
Trip99
If you select Win32 you should get a choice of Win32 Console or (to the right of it) Win32 Project which is the one you want.
------------------------See my games programming site at: www.toymaker.info
synth_cat
synth_cat
That option doesn't appear; it is as if this option is not defined. What do I have to do?
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
synth_cat
synth_cat
Well, I guess the option is there, but it reads "Win32 Forms Application" or something like that. So I selected that option and tried it out.

Then I was introduced to my new project. It was completely confusing. I was hoping that VC++2005 would be nice to me and just create an empty project, allowing me to write the actual code. Instead, it provides me with a bunch of prewritten code, resources, and options which I, quite honestly, can barely understand. How do I simply cut and paste my old code into this thing and run it? Will it even work? And are all these new options and resources going to make development completely different from how it was in VC++6?
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
Boder
Boder
Make sure you have the platform SDK and then create an empty project.

Make sure you set up you include/linker directories. Then link to the appropriate libraries.
synth_cat
synth_cat
If it's not too much trouble, how do you set up those directories? Do you just do #includes? And, by the Platform SDK, do you mean the lib and include files that come with the VC++2005 download, or is this something I have to get elsewhere?

Sorry to be so clueless here, but I've never felt up to scratch when it comes to dealing with compilers.
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
SirSmokey
SirSmokey
When you open VC++ there should be a getting started window to the left, there you can find a link "Download the PSDK". Go there (Or click here if you can't find it. There will be a link on that page to the PSDK download and there are instructions for setting up VC++ for Win32 Apps after the install.

Note that when I installed the PSDK I just copy and pasted the paths for the libraries, includes and executables, which on the page is:
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\(Whatever)

However after my install i found that they were installed to the path
C:\Program Files\Microsoft Platform SDK\(Whatever)

So just make sure to check that or you'll get linker errors.
Boder
Boder
Platform SDK: Link

Directories: Tools > Options > Project and Solutions > VC++ Directories

Linking: Project > FOOBAR Properties... > Linker > Input > Dependencies
synth_cat
synth_cat
Well, thanks for the help! I followed all the instructions, and on Monday I will try and make a project and see if it works.

I am still not sure exactly what I need to do, though. Since I want to create an app _completely_ based on code I've already written, should I just create an "empty project?" If I were to do this and then add a .cpp file with all my code in it, would VC++2005 automatically realize that I intended it to be a Win32 Application? Or will I have to go with VC++2005's Win32 Application Project setup and then have to deal with all the extra options and directories that I don't want or need?
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
Sr_Guapo
Sr_Guapo
Quote:
Original post by synth_cat
Well, thanks for the help! I followed all the instructions, and on Monday I will try and make a project and see if it works.

I am still not sure exactly what I need to do, though. Since I want to create an app _completely_ based on code I've already written, should I just create an "empty project?" If I were to do this and then add a .cpp file with all my code in it, would VC++2005 automatically realize that I intended it to be a Win32 Application? Or will I have to go with VC++2005's Win32 Application Project setup and then have to deal with all the extra options and directories that I don't want or need?


Select a win32 application, then tell it to be an empty project. Then all the settings will be correct for the compiler and you don't have any files.
Sean Henley [C++ Tutor]Rensselaer Polytechnic Institute
synth_cat
synth_cat
Well, I just created an empty Win32 project - thanks!

But I have another question. How do I set up the directories for the DirectX SDK? Do I add links to the .lib and .h files _exactly_ the same way I linked to the Windows SDK, or is there a different way? And do I have to add an "Executables" link, like with the Windows SDK, or no?

Just one more question: What is the correct way to delete projects in VC++2005? I have been creating test projects and deleting them by removing their temp files, but I have a feeling this wasn't the correct approach. Have I damaged anything, and how should I properly delete projects in the future?
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
Brian Jones
Brian Jones
I am also making the switch from VC6 to 2005. But I'm using the express version.
To include directories: Tools -> Options -> Projects and Solutions Tab -> VC++ Directories.

These two links may help learing the new IDE

http://msdn2.microsoft.com/en-us/library/ydxtaww6.aspx
http://msdn.microsoft.com/vstudio/express/visualc/learning/
I don't have a signature
synth_cat
synth_cat
Thanks for those useful links, but I still don't get how to delete projects. I'm also not quite sure how many references I actually need to make to the DirectX SDK in the options dialog box.
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
synth_cat
synth_cat
Sorry about this, but I have another question.

For me with my simple project, what is the difference between selecting "Build Solution" and "Build ?" Does it matter?
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
misterPhyrePhox
misterPhyrePhox
Quote:
Original post by synth_cat
Sorry about this, but I have another question.

For me with my simple project, what is the difference between selecting "Build Solution" and "Build ?" Does it matter?


A solution can consist of multiple projects.

By the way -- are you using Visual C++ Express Edition? You can't create a windows project from the "New Project" dialog in VCEE; you need to create a console application, and then go into Project Properties->Linker->System, and select SubSystem: Windows.

If you ever need to create Dynamic Link Libraries, the situation is similar; you must go to Project Properties->General and set Configuration Type: Dynamic Library.
synth_cat
synth_cat
misterPhyrePhox-

I knew that I wasn't supposed to be able to create Windows projects _at first_, but I thought that following the instructions at the link below would have been enough.

http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/

Still, I went to the directory that you told me to go to, and my project Subsystem
setting was already "windows." I guess that either way works.
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
misterPhyrePhox
misterPhyrePhox
Quote:
Original post by synth_cat
misterPhyrePhox-

I knew that I wasn't supposed to be able to create Windows projects _at first_, but I thought that following the instructions at the link below would have been enough.

http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/

Still, I went to the directory that you told me to go to, and my project Subsystem
setting was already "windows." I guess that either way works.


Ah, thats cool. I never knew you could do that!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.