Jump to content
  • Advertisement
Sign in to follow this  
FireNet

? Using Visual Studio 2005 Effectively

This topic is 4436 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My problem is quite simple: I've recently started using the Visual Studio 2005 IDE (C++) for coding and it works great, I've been able to compile most of the stuff I've downloaded and also my own projects. The problem is I've no real idea how to properly configure the environment. Oh I do know how to do the basic stuff like setting additional soure/lib directories, include lib etc, etc. But I have to do it for each project I do, manually. :P What else can I do? What about project templates? I've also started to work on multiple projects at the same time, and some of the projects are based on some other projects I am working on. Right now, I am just including the files manually. I think there are something called dependencies but I've no idea how to set it up, or use it. What are dependecies? What are the best ways to share code between multiple projects? What about compiling LIBs or DLLs? The worst bit: I've have no idea where to start looking. Please provide me with some links and pointer :(. I've tried googling but I get all sorts of stuff about Visual Studio 2003 .net and stuff about doing specific projects. Eg: Google Search I tried I am having a look around Visual Studio's site, but it's a bit vast :P http://msdn.microsoft.com/vstudio/

Share this post


Link to post
Share on other sites
Advertisement
Correct me if I'm wrong, but it sounds like you are confused about the differences between solutions and projects, or at least their practical purposes.

When sharing code, it's easiest to keep each independent code chunk in its own project, which can be added to any number of solutions. Thus, a solution, for most practical purposes, is just a collection of references to projects.

To add a project to an existing solution, just right click on the solution in the Solution Explorer window, and click on "Add New Project” or "Add Existing Project" if the project already exists.

As a side note, I think this concept is always initially confusing because Visual Studio quietly creates a solution to contain your project, when you create a new project from the File menu.

As far as DLLs and LIBs, you should be able to create them as a different project type from the New Project dialog in Visual Studio. You can also change what a project compiles to (LIB, EXE, etc.) by opening up its Properties dialog.

Dependencies in Visual Studio are very simple. If you click on a project in the Solution Explorer, and go to Projects->Dependencies..., you are provided with a dialog that allows you to change what projects in your solution depend on each other. This will ensure the proper order of compilation, and statically link any LIBs or DLLs that an EXE project depends on.

If you want to share source code, but don't want separate projects, you're going to have to add each source file manually to each project. It's perfectly fine for multiple projects to reference the same file.

As far as just toying around and discovering features, there are a multitude of settings in the Properties dialog for a project, and quite a few under the Options menu for the IDE itself.

I hope that helps, and sorry if I misunderstood you :)

[EDIT] - In regards to the "What else can I do?" question, Visual Studio has a whole separate interface for creating macros. It's really quite cool; I suggest you check it out. I've only touched the surface of the possibilities myself. As an example, I made a macro that prints out a comment-header for a file, including the current date, the name of the file, my name (author), and other relevant information automatically.

You can also create your own project templates and wizards, although finding good documentation on how to do that, from my experience, is a bit difficult.

There are many more things you can do, those are just couple of the cool ones I know.

-Chris

Share this post


Link to post
Share on other sites
Hmm.. sound good. I will have to try the stuff out though to see what would be best ;)

Thanks a lot ;)

Share this post


Link to post
Share on other sites
Here are a couple of links I found .... interesting :P


Templates
http://davidhayden.com/blog/dave/archive/2005/11/05/2556.aspx
http://msdn.microsoft.com/msdnmag/issues/06/01/CodeTemplates/



Gold Mine:
Nah, Just the MSDN Documentation link to Managing Solutions, Projects, and Files. And there's a lot more stuff related to VS 2005 ;)
http://msdn2.microsoft.com/en-us/library/wbzbtw81.aspx

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!