How to list definitions exported by Visual C++ library file

On Windows, library files (.lib) are commonly produced by compilation using the Visual C++ compiler. Sometimes, you may want to know which library file exports the definition of a certain function or global variable.

The definitions exported by a library file can be listed by using the dumpbin tool. This ships with Visual Studio and can be invoked by opening the Developer Command Prompt for Visual Studio.

To list the definitions exported by a library file use:

C:\> dumpbin /exports foo.lib

Note that C function definitions will have an underscore as prefix. But, C++ definitions will be much more mangled. However, if you know the function name or even a substring of it, you could investigate using the output of this program.

Tried with: Visual Studio 2012 and Windows 7 x64

How to get started with Tao Framework using C#

The Tao Framework is a .Net wrapper library for the OpenGL, GLU, FreeGLUT and Cg libraries. It is now deprecated and its functionality has been superseded by the OpenTK project. However, it is perfect for writing simple OpenGL or GLUT programs in .Net languages like C#.

Getting started on the Tao Framework using C# is easy:

  1. Download and install the last version of Tao Framework from here. The installer will add its .Net assemblies to the GAC.
  2. Create an empty C# console application project in Visual Studio.
  3. Add references to Tao.OpenGL.dll and Tao.FreeGLUT.dll to the project. These files can be found in C:\Program Files (x86)\TaoFramework\bin
  4. Paste the source code given below into the C# source file.
  5. Copy FreeGLUT.dll from C:\Program Files (x86)\TaoFramework\lib to directory of the generated EXE file.
  6. Run the program. You should see a grey teapot!
  7. Whether you are porting an existing C or C++ OpenGL application or writing your own, it should be easy to build upon this program.

Tried with: Tao Framework 2.1.0, Visual Studio 2012 and Windows 7 x64

How to get started with OpenTK using IronPython

OpenTK is a .Net library that provides a wrapper to OpenGL, OpenCL and OpenAL. Here are the first steps to get started using it with IronPython:

  1. Download and install OpenTK. The .Net assembly files of OpenTK can be found in its OpenTK\1.0\Binaries\OpenTK\Release directory.
  2. Create an empty IronPython solution in Visual Studio.
  3. Place OpenTK.dll in the directory of the Python source file.
  4. Paste the source code given below into the Python source file.
  5. Run. You should see a colored triangle. Press ESC to quit.

Tried with: OpenTK 1.0, IronPython 2.7.3, Visual Studio Express 2012 and Windows 7 x64

How to get started with OpenTK using C# and Visual Studio

OpenTK is a .Net library that provides a wrapper to OpenGL, OpenCL and OpenAL. Here are the first steps to get started using it with C# and Visual Studio:

  1. Download and install OpenTK. The .Net assembly files of OpenTK can be found in its OpenTK\1.0\Binaries\OpenTK\Release directory.
  2. Create an empty C# console application project in Visual Studio.
  3. Place OpenTK.dll in the directory of the C# source file.
  4. Add System.Drawing and OpenTK as References to the project.
  5. Paste the source code given below into the C# source file.
  6. Run. You should see a colored triangle. Press ESC to quit.

Tried with: OpenTK 1.0, Visual Studio Express 2012 and Windows 7 x64

How to get started with PhysX.Net

PhysX.Net is a .Net library that has been written as a wrapper for the PhysX library from NVIDIA. This enables you to use PhysX from C# or any other .Net language.

  1. Ensure that the PhysX SDK is installed and running correctly. This post explains how to get started with PhysX.
  2. Download the latest build or nightly build of PhysX.Net from here. Unzip the contents of the zip file. It has the PhysX.Net.dll .Net assembly file that contains the wrapper methods and classes for both x86 and x64 architectures.
  3. Download the latest source code of PhysX.Net from here. Unzip the contents of the zip file.
  4. Open the PhysX.Net-3.sln solution file in Visual Studio. Examine the Samples project, it has the code for sample programs, such as JointsSample. All of the Samples use the code from the Engine sample, which has the code common to all the Samples.
  5. Add the PhysX.Net.dll downloaded in Step 2 as a reference to all the Samples.
  6. Build the Engine sample. This produces a PhysX.Samples.Engine.dll .Net assembly file that will be used by the other Samples.
  7. Now build any of the Samples, for example, the JointsSample. This produces a PhysX.Samples.JointsSample.exe.
  8. The EXE files need the PhysX DLL files, from NVIDIA, to execute. These are the 5 files: PhysX3CharacterKinematicCHECKED_x86.dllPhysX3CHECKED_x86.dllPhysX3CommonCHECKED_x86.dllPhysX3CookingCHECKED_x86.dll and PhysX3GpuCHECKED_x86.dll. These files can be found in the NVIDIA PhysX SDK or in the Assemblies directory in the PhysX source code. Place these in the same directory as the EXE file.
  9. Now you should be able to run the EXE file directly or debug it from Visual Studio.

Tried with: PhysX.Net 102011, PhysX 3.2.4, Visual Studio Express 2012 and Windows 7 x64

How to get started with PhysX on Windows

It can be a bit difficult to get started developing with PhysX on Windows since there is not a lot of documentation. Here are a few steps to get started easily:

  1. Download the latest PhysX SDK. To do that you need go here. You need to register to login. Once inside, head over to Home > Downloads > PhysX SDK 3.2 > More. Grab the latest version, it will be a zip file.
  2. Unzip the downloaded PhysX SDK zip file. Go to Samples\compiler and choose the Visual Studio version that matches or is closest to the version you are using.
  3. Open the Samples.sln solution file. Compile the Samples project inside it.
  4. Hopefully, the compilation is successful. Note the last line in the Output window of Visual Studio. This shows the path and the name of the EXE file that it has produced.
  5. Open this EXE file and enjoy the PhysX demos.
  6. Now that you have PhysX samples running, have a look at the code and the settings of the solution to learn how to write your own PhysX code and compile it.

Tried with: PhysX SDK 3.2.4, Visual Studio Express 2012 and Windows 7 x64