Author Topic: Getting Started with Visual Studio Express  (Read 48165 times)

0 Members and 1 Guest are viewing this topic.

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Getting Started with Visual Studio Express
« on: January 17, 2007 »
a d/l of devc++ that's been sitting on my HD fro a while, v 4.9.9.2

I have got VC installed but my reg key's been messed up.
« Last Edit: January 18, 2007 by Jim »

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: Graphics in C++
« Reply #1 on: January 17, 2007 »
ive got visual studio 2005 express but i dont yous it is it really posible to get extra speed from visual studio that isnt there in dev c++ 5by getting it to generate code for sse sse2? cause if so i think ill be ditching dev c!
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: Graphics in C++
« Reply #2 on: January 17, 2007 »
Nino,

Well I dont know about dev C++ supporting an sse switch but certainly gcc supports sse acceleration. I usually use my own makefiles which I find far easier than devC++ projects. I would check your gcc manual for SSE glags, maybe like -msse -mfpmath=sse???

Mind you there are other reasons for switching to studio, like directx works a lot easier with cl than with gcc.



Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Graphics in C++
« Reply #3 on: January 18, 2007 »
In full VS2005, the option is Project->Properties->C/C++->Code Generation->Enable Enhanced Instruction Set.  I need to get the install of Express to see if it's there - it's supposed to be.

Jim
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: Graphics in C++
« Reply #4 on: January 18, 2007 »
In full VS2005, the option is Project->Properties->C/C++->Code Generation->Enable Enhanced Instruction Set.  I need to get the install of Express to see if it's there - it's supposed to be.

Jim

Project->Properties->Configuration Properties->c/C++->Code Generation->Enable Enhanced Instruction Set

So almost the same on Express.

Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: Graphics in C++
« Reply #5 on: January 18, 2007 »
Finally, thanks to Jim I've got VC++ set up and this working in it although with the different rounding from using the asm in devc the interpolations a little off and it's a bit slow again probably due to the float-int conversions. It's late now and I've gotta go but I'll sort this stuff out tomorrow.

Thanks again Jim.

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Getting Started with Visual Studio Express
« Reply #6 on: January 18, 2007 »
Here are some basic instructions to get started using Microsoft's cut down Visual Studio.NET 2005.  It's a truly excellent free compiler and IDE.

First of all, you need to be able to do big downloads.  For doing Windows development you need both Visual Studio Express and the Platform SDK which in total are around 900Mb.

Microsoft's own instructions for installation are actually very good, so you might just want to follow those.  The home page for Express is here

*** Update 20/11/08 *** The instructions for patching VS2005 to make Win32 Applications have moved to here

First of all, you need to download Visual C++ 2005 Express Edition.  Its homepage is here

As with many Microsoft downloads, the initial part of the install only downloads a small installer which grabs the rest of the software off the net while it's installing.  I don't like this, personally, so I went to the manual install page and downloaded the .ISO file which is 474,686Kb.  The big advantage here is you get everything in one hit.

Once you have that installed, you are able to develop command line programs and not much else.  To develop Windows applications and DLLs you need the Platform SDK.  This is all the headers and libs to develop Windows programs (except DirectX which is a separate download).

So to install the Platform SDK and patch VSE2005 to use it, go here.

Again, the default download is tiny, and you can download the entire SDK via a link at the end of
this page.  It's 409Mb.

Once you have the Platform SDK installed you need to follow instructions 3,4 and 5 on the usingpsdk page.
In section 3, the Options page it is talking about is
Tools->Options->Projects and Solutions->VC++ Directories
Click the New Folder icon top right to create a new line, and either paste in the lines from the website or browse to the files if you didn't install them in the default location.

Follow options 4 and 5 closely.  Once you've done that, close and reopen Visual Studio Express for the changes to take effect.

Finally, back here again, you should install the Visual Studio Express Editions 2005 Service Pack 1.

To create a new Windows project, go to File->New->Project.
Choose
Visual C++->Win32->Win32 Console Application
And type in the name of the Solution and Project.  Click OK.
A Solution can contain more than one project, to keep all your related work together.

Choose
Application Settings at the left hand side of the dialog.
Choose
Windows Application radio button.
Select
Empty Project and click Finish.

This will create an empty Windows project.

If you already have source code, in the solution explorer you can right click the project name and select
Add->Existing Item
if not you can choose
Add->New Item

I suggest you make a copy of any code you port into Visual Studio, since you might have to change it a little if you're moving from another compiler like devc.

Once you have some buildable code, you will probably want to turn off Unicode support.  Most code isn't Unicode, but Microsoft are (probably correctly) defaulting their tools to support character sets with more than 256 characters in.

To do this, choose
Project->Properties->Configuration Properties->General->Character Set->Use Multi-Byte Character Set
Click OK.

Finally you can use
Build->Build Solution (F7) to build your code

and

Debub->Start Debugging (F5) to start running it in the debugger.

If the code doesn't build, click on the error message and it will take you to the line the error occurred.  If you don't understand anything F1 always brings up related help (I choose not to use online help, since it's all in the Platform SDK you installed).

To change to a Release build instead of Debug, choose the drop down box on the toolbar that says 'Debug' and choose 'Release'.  You will need to change the Unicode setting again since project properties are specific to each configuration.  You can have as many configurations as you want using the Configuration Manager which is also in that drop down box.

There are loads of other useful features in the editor and the debugger is excellent.

Please correct, update or reply to this article if you see mistakes or omissions.

Jim
« Last Edit: November 19, 2008 by Jim »
Challenge Trophies Won:

Offline mind

  • Texture-San
  • DBF Aficionado
  • ******
  • Posts: 2324
  • Karma: 85
    • View Profile
    • boredom is a beatiful thing.
Re: Getting Started with Visual Studio Express
« Reply #7 on: January 18, 2007 »
awesome post jimbo.. inc(karma);

been thinking about making the switch to a c syntax language and this might be exactly what i need..
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Getting Started with Visual Studio Express
« Reply #8 on: March 07, 2007 »
I've tried following the instructions above, for me they are unclear. The compiler does not seem to know where to look to find an include file.

I've installed vcstudio and psdk.

I also tried to follow the guidelines above but I don't know why, they are just confusing.

Quote
Once you have the Platform SDK installed you need to follow instructions 3,4 and 5 on the usingpsdk page.

????????????????????

Would this be the page  in the platform SDK doccumentation that appears in the program menu after installation?

Options 3 4 and 5 are confusing. The directory structure that they talk about does not exist.
Not on my installation anyway.

Never mind, I can make "hello world" console apps!

hehe.

This will be nice when it works but for now it sucks.

Shockwave ^ Codigos
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Getting Started with Visual Studio Express
« Reply #9 on: March 07, 2007 »
My installation is so fucked up now.
I will probably have to uninstall everything. Thinking of using devc instead, as usual Microsoft makes what should be an easy install a fucking nightmare. Advice to anyone wanting to use Visual Studio Express... Well I'd say don't ask >me< how to install it because I followed the instructions to the best of my ability and ruined it.  :vangry:
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Getting Started with Visual Studio Express
« Reply #10 on: March 07, 2007 »
I think I have it working.
Basically I had to manually add the directory paths for lib , bin and inc in the visual studio options menu.

I still think M$ is totally sucky, but at least is seems to be working (in that I can include windows.h and build a successful exe) no doubt more problems will surface later from this typically lame and shit microtwatsoft installation.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: Getting Started with Visual Studio Express
« Reply #11 on: March 07, 2007 »
I think I have it working.
Basically I had to manually add the directory paths for lib , bin and inc in the visual studio options menu.

I still think M$ is totally sucky, but at least is seems to be working (in that I can include windows.h and build a successful exe) no doubt more problems will surface later from this typically lame and shit microtwatsoft installation.

Totally agree with you here. I also remember having some troubles installing M$ VC++.
Though my first experience working with it was quite positive. Nevertheless, I want to
give Eclipse C++ plugin a try someday - because I nearly do all my programming with
the Eclipse IDE nowadays.

Nevertheless, I also had to do some changes manually and I really wonder why M$
makes installing such a product like the Visual Suite so complicated. Every shareware
product provides a more comfortable way to install.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: Getting Started with Visual Studio Express
« Reply #12 on: March 07, 2007 »
VC++2005 was designed first for .Net programs, to make all modifications to use it for win32 project is really annoying  :( , you need to carefully follow the procedures to install PSDK libraries.

That IDE is really good, believe me, it's really worthy to try hard and install VC++2005

@Shock: Let me know if you get more troubles with it...
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Getting Started with Visual Studio Express
« Reply #13 on: March 08, 2007 »
Thanks Rbraz, having used a few different Ide's in my life I agree with you, this one looks excellent as you say. I don't know if I have made all the right paths to the psdk libraries but I will appreciate the help in the future as I am bound to run into problems! Thanks mate.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Getting Started with Visual Studio Express
« Reply #14 on: March 11, 2007 »
If there's anything wrong with my instructions can you please update them or add a note?  The bit you had to do manually is correct - you have to add the paths to the platform SDK (inc/lib/bin) to the global paths in the options.

Stick with it :D

Jim
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Getting Started with Visual Studio Express
« Reply #15 on: March 14, 2007 »
Installing the DirectX SDK

If you don't already have it, download the DirectX9c February Edition from here
http://www.microsoft.com/downloads/details.aspx?FamilyId=09F7578C-24AA-4E0A-BF91-5FEC24C8C7BF&displaylang=en, it's 432Mb.

Once you have it installed, you need to add the paths just like you did with the Platform SDK, that is
Tools->Options->Projects and Solutions->VC++ Directories
Click the New Folder icon top right to create a new line, and browse to the files in the installation.
By default they are
C:\Program Files\Microsoft DirectX SDK (February 2007)\Include
C:\Program Files\Microsoft DirectX SDK (February 2007)\Lib\x86

Jim
Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: Getting Started with Visual Studio Express
« Reply #16 on: March 14, 2007 »
This is nothing to do with DX but I'm getting reports of this message from others trying to run my exe:

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. ...

It's something to do with missing files so what do i need to distribute?

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Getting Started with Visual Studio Express
« Reply #17 on: March 15, 2007 »
Probably the runtime library DLLs.  Try going in to

Project->Properties->Configuration Properties->C/C++->Code Generation->Runtime Library

and change it from Multi-threaded DLL to Multi-threaded.  That will build it with static libraries.

Jim
Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: Getting Started with Visual Studio Express
« Reply #18 on: March 15, 2007 »
Thanks Jim, that worked although the exe's now a little bit bigger.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Getting Started with Visual Studio Express
« Reply #19 on: March 15, 2007 »
Get this bad boy onto it :)

KKRUNCHY!

It'll squish it down again.
Shockwave ^ Codigos
Challenge Trophies Won: