Showing posts with label VS2008. Show all posts
Showing posts with label VS2008. Show all posts

May 23, 2011

Sep 13, 2009

log4cxx with Visual Studio 2008

1- Download necessary files from here

2- Then unrar the file and under msvc9-proj directory, open the VS project to build necessary dll and library files.

3- Copy the dll file under Release_Shared.

4- Open Visual Studio. Tools->Options->VC++Directories->Library Files, add path to Release_Shared directory for linking necessary libraries.

5- Tools->Options->VC++Directories->Include Files, add path to src/main/include

6- To use the static link log4cxx library, the macro LOG4CXX_STATIC MUST be defined in your projects preprocessor, otherwise your compilation will suffer unresolved linking error:
6-1) Open your project's settings.
6-2) C/C++->Preprocessor->Preprocessor Definitions , add LOG4CXX_STATIC.

Now, you can use logger with Vs 2008.

Ref: http://www.dreamcubes.com/blog/index.php?itemid=43

Aug 26, 2009

Getting OpenGL to Work With Visual C++ 2008

Follow each step, unless you have already done one of these steps.
1. Install Visual C++ 2008 Express Edition

This is a free C++ IDE from Microsoft that is an excellent tool to start with, if you are interested in programming on a Windows environment.

You can find Visual C++ 2008 on the Visual Studio Express download page on Microsoft's site. It only works on Windows XP and up. If you have an older version of windows you might want to find Visual C++ 2005 and then use this Visual C++ 2005 and OpenGL tutorial.
2. Install Windows SDK for Windows Server 2008 and .NET Framework 3.5

This is the equivalent to the Windows� Server 2003 SP1 Platform SDK that Visual C++ 2005 users installed. It contains the main OpenGL libraries. You can download the Windows SDK for Windows Server 2008 and .NET Framework from the Microsoft website.

The installation will take a little while.
3. Install the GLUT Libraries

These are additional libraries that come in handy down the road. Some code samples you find may use them, so I find it best to just have them around right off the bat.

GLUT itself is a bit old, but there is another one called freeglut that is a little more actively maintained. I install both of them. Download freeglut from the freeglut SourceForge page. I download the original GLUT from Nate Robins' site.

For both downloads, unzip them and do the following:

1. Copy all the .h files into the C:\Program Files\Microsoft SDKs\Windows\v6.1\Include\GL folder. This should be glut.h, freeglut.h, freeglut_ext.h, and freeglut_std.h.
2. Copy all the .lib files into the C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib folder. This should be freeglut.lib and glut32.lib.
3. Copy all the .dll files into the C:\Windows\system32 folder. This should be freeglut.dll and glut32.dll.

4. Create Your First Project

Create a project in Visual C++ with whatever name you like and set the template as Win32 Project. Click OK.

Click Next on the following screen and you will be taken to Application Settings. Check on Empty Project and then click OK. Your new project has been created.

Declare the dependencies for your project.

1. Click on Project -> [project name] Properties.
2. Expand Configuration Properties.
3. In the Configuration dropdown, select All Configurations.
4. Select Linker -> Input.
5. In the Additional Dependencies field, enter in GlU32.Lib OpenGL32.Lib freeglut.lib glut32.lib. Then click OK.

5. Create Your First Source File

I recommend a .cpp file. I recommned downloading the source code from NeHe's Lesson 2 and copying into the file you just created.

Press F7 to compile it and F5 to run it.

It should be working at this point. If not, post a comment and I will try and help out.

Reference: http://thoughtsfrommylife.com/article-748-OpenGL_and_Visual_Studio_Express_2008

Jul 9, 2009

Jul 2, 2009

OGRE SDK for Vista and Visual 2008

1 - Download OGRE SDK for your compiler : Here

2 - Download OGRE SDK AppWizard for your compiler : Here

Note: They are for VS2008, if you want to setup Ogre SDK for VS2005 or others, please look at this link.

3 - INSTALL OGRE SDK

Very important!

Do not install this into a directory name with spaces in it, like "My Documents" or the like. You are only asking for trouble.

Choose a sensible no-spaces-in-it name, like C:\OgreSDK.
Install the OGRE SDK.

After installation, we are checking that everything is alright. We want the OGRE_HOME environment variable present, and we want it to point to where the OgreSDK is installed.

It happens by default, but we are checking anyway.

Right-Click the "My Computer" icon, go to the Advanced tab and click on the Environment Variables button.




You should see an OGRE_HOME environment variable pointing to your newly installed OGRE SDK.

4 - OGRE AppWizard

* Unzip folder under C:\OgreSDK. After that, go to C:\OgreSDK\ogresdkwizard90_v1_5_1\Files\

* Open OgreSDKAppWizard90.vsz with Notepad.
* Edit paramater ABSOLUTE_PATH to C:\OgreSDK\ogresdkwizard90_v1_5_1\Files
* Then copy OgreSDKAppWizard90.ico, OgreSDKAppWizard90.vsdir and OgreSDKAppWizard90.vsz to {Microsoft Visual Studio 9.0 PATH }\VC\vcprojects or if you use express edition {Microsoft Visual Studio 9.0 PATH }\VC\Express\VCProjects

5 - Create a New Project and Build it on VS2008, just like on the this web site.

6 - Then execute the exe document in your OgreSDK/bin/debug.

7- If it is working, Good Job ! If it is not and gives some dll errors, such like d3dx9_xx.dll, d3dx10_xx.dll etc. Go to http://www.m3fe.com/content/d3dx/ web site and download the missing dll to your OgreSDK/bin/debug. and now, run it :D

Enjoy programming with Ogre3D !

Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release

Solution:

Project->Properties->C/C++->General->Detect 64-bit Portability Errors->No

Visual Studio Keyboard Shortcuts

Playing with keyboard shortcuts is very interesting and reduce the headache of using the mouse again and again while programming with visu...