Install (MSVC)

From Open Babel
Revision as of 05:21, 18 January 2007 by Baoilleach (Talk | contribs) (Initial info on compiling OpenBabel on Windows)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Here we describe how to compile OpenBabel on Windows using the Microsoft Visual C++ compiler (MSVC). We recommend the following compiler which is available for free:

You also need to install the Platform SDK.

Compiling wxWidgets

To compile the Windows GUI, you will need to install and compile wxWidgets. We are currently using wxWidgets 2.6.1. To compile it...

  • Unzip it into a folder that doesn't contain spaces
  • Read the install notes in the distribution
  • Read more install notes on the web site
  • Open "build\msw\wx.dsw"
  • Under the default target 'wxregex', open "setup.h" and change
#define wxUSE_STD_IOSTREAM  0


#define wxUSE_STD_IOSTREAM  1
  • On the menu, choose "Batch Build", and sort by "Configuration". Select only those configurations of type "Release", and click on Build All.
  • Set the environment variable WXWIN to the installation directory of wxWidgets, and restart MSVC.

Compiling one of the OpenBabel GUI targets

The GUI targets, OBGUII and OBabelGUI, need some extra tweaking to get them to work. Here we describe the procedure for OBGUII, but it is the same for OBabelGUI.

  • Make sure you have carried out all of the instructions in the section on [Install (MSVC)#Compiling wxWidgets | Compiling wxWidgets].
  • Open the OBGUII Properties dialog (by right-clicking on the project name), choose "Preprocessor definitions" and add the following:
  • In the same dialog box, add the following to "Linker", "Additional Dependencies":