Contents

Introduction

This page describes how to compile Object Icon on Windows (32 and 64 bit).

Cygwin

Cygwin must be installed. It is used to provide make and some other shell utilities. gcc is not required however, since the Microsoft Visual C/C++ compiler is used. The compiled executables don't rely on Cygwin in any way, and can be used from a Windows command prompt window if desired (a paths.bat file is provided to set the usual environment variables).

Microsoft Visual C++ compiler

The C/C++ compiler of Visual Studio 2015 must be used. It is not necessary to install Visual Studio itself; rather just the build tools alone are sufficient. These are a free download :-

http://landinghub.visualstudio.com/visual-cpp-build-tools

The compiler executable, cl, must be on the cygwin shell's PATH. Both 32 and 64 bit versions of the compiler are supported. To see which version is on the path, just type cl at the bash prompt. For 32 bits the output might be :-

Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

whilst for the 64 bit version :-

Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

Apart from PATH, the enviroment variables INCLUDE, LIB and LIBPATH need to be set correctly for the compiler to work from the command line. To find the correct settings, open a command prompt window, and run the vcvarsall.bat batch file, as described in the following page :-

https://msdn.microsoft.com/en-us/library/x4d2c09s.aspx

After running the batch file, the correct environment variable settings can be noted and placed in .bash_profile. Example settings are, for 32 bits :-

PATH=/cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 14.0/VC/bin:/cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 14.0/Common7/IDE:/cygdrive/c/Program\ Files/Debugging\ Tools\ for\ Windows\ \(x64\):$PATH
export INCLUDE='C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\10\include\10.0.10150.0\ucrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\winrt;'
export LIB='C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Windows Kits\10\lib\10.0.10150.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\x86;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86;'
export LIBPATH='C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB;References\CommonConfiguration\Neutral;\Microsoft.VCLibs\14.0\References\CommonConfiguration\neutral;'

and for 64 bits :-

PATH=/cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 14.0/VC/bin/amd64:/cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 14.0/Common7/IDE:/cygdrive/c/Program\ Files/Debugging\ Tools\ for\ Windows\ \(x64\):$PATH
export INCLUDE='C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\10\include\10.0.10150.0\ucrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\winrt;'
export LIB='C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.10150.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\x64;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64;'
export LIBPATH='C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64;References\CommonConfiguration\Neutral;\Microsoft.VCLibs\14.0\References\CommonConfiguration\neutral;'

Compiling from the subversion source repository

Use the following command to checkout a read-only copy of the source code :-

svn co svn://svn.code.sf.net/p/objecticon/code/trunk objecticon

This will create a directory objecticon under the present directory (you can change the last parameter to create a different directory name if you want).

Compiling from a tar.gz file

Extract the source code from the .tar.gz file with a command like

tar xfz objecticon-latest.tar.gz

This will create a directory objecticon-5195 under the current directory. The number is the subversion version number from which the .tar.gz was built, and of course may be different. You can rename this directory if you like.

Configuration

After ensuring that the cl compiler is available, change to the new directory and run the following command at the bash prompt :-

./configure-win32

This is the equivalent of running the ./configure script on a Unix system. Now make can be run to compile everything, and make test will run the tests.

Environment variables

Amongst other things, the configure-win32 script creates a paths.sh file, which can be used to set the various Object Icon environment variables from within the cygwin bash shell, and paths.bat which sets the same variables from within the Windows command line.

Contents