Building CompuCell3D on Windows using Visual Studio 2015 and Python 3.6+

Building CompuCell3D from source on Windows systems using freely available Visual Studio 2015 is fairly straightforward. We provide all dependencies so the only thing you need to do is to install Visual Studio 2015 (Community Edition is free and fully functional) , SWIG, CMAKE and GIT for windows . The following will help you build and install CC3D on most Windows systems.

Prerequisites

Hardware

CompuCell3D may build and run with less capable hardware, but has been tested with the following:

Build Tools and Dependencies

SWIG, CMAKE and GIT for windows

Installing CC3D Compile Dependencies

Go to dependency repository and download prerequisites_cc3d_4.0.0_win_64bit.zip

Unpack it to your C:/prerequisites_py3 or D:/prerequisites_py3 drive and make sure you have either C:/prerequisites_py3/64bit or D:/prerequisites_py3/64bit directories on your system.

Adding SWIG to search Path

In my case swig was installed to C:/swig. Then I go to open Control Panel » System » Advanced » Environment Variables. They are separated into user and machine specific values. You can view and edit their values there. Their current values upon launch are made available to all programs. I will add c:\swig to PATH variable (I am editing user environment variables, not the global ones) as shown below:

v00.jpg

Source Code

Once the dependencies have been satisfied, obtain the source code from our GIT repository using the following command from git command-line tool:

git clone https://github.com/CompuCell3D/CompuCell3D.git D:/CC3D_SOURCE
git checkout 4.0.0

After cloning we also checkout 4.x branch - in our case it happens to be 4.0.0 but you should check which branch is latest and checkout that one Take a look at the screenshot to see how this would look:

step_001.png

This will create a directory d:\CC3D_SOURCE` and download the source code into it.

At this point we are ready to configure CC3D for building using Visual Studio 2015

Generating VS 2015 project using CMake

CompuCell3D is configured using the CMake build system. Double-click CMake icon and set source and build directories to d:\CC3D_SOURCE\CompuCell3D and D:\CC3D_SOURCE_build as shown below:

step_002

After clicking Configure you will get a pop up dialog where you should select Visual Studio Project 2015 as a target project generator - here we will choose 64-bit build

step_003.png

After configuration is done you will get a screen that looks somewhat similar to the one below:

step_004

As you can see it informs you that the error has occurred. This is normal and it means we need to provide certain type of information to CMAKE:

We are almost done, but now we need to make sure that Python library, Python include path and Python executable point to the Python distribution that is bundled in the D:/prerequisites_2017/64bit folder:

To do that click Advanced check-box at the top and type Python in the search bar next to the box you have just clicked. The input the following:

After we input these changes (see below) and click Configure again we will get the following screen:

step_005

You may check NO_OPEN_CL option if you do not have OPEN_CL toolkit installed

Click Configure , followed by Generate buttons and then open up Visual Studio 2015.

Compilation with Visual Studio

1. Open up ALL_BUILD project in D:/CC3D_SOURCE_build - go to File->Project/Solution... and navigate to D:/CC3D_SOURCE_build and choose ALL_BUILD:

step_006

2. Change build configuration to Release or RelWithDebInfo - go to Build->Configuration Manager... and pick RelWithDebInfo from pull-down menu:

step_007

3. Right-click on the ALL_BUILD in solution explorer and choose build from the context menu to start compilation

step_008

4.Right-click on the INSTALL in solution explorer and choose build from the context menu to install CompuCell3D into d:/cc3d_400

step_009

It takes a while for windows to copy all the files to the installation folder but once this is done , go to the directory where you installed CC3D by typing at command-line prompt

D:

followed by

cd cc3d_400

followed by CompuCell3d start-up script:

compucell3d.bat

step_010

This completes manual build of CC3D on Windows using Visual Studio 2015.

CompuCell3D: SrcBin/CC3DWindowsCompile_vs2015_Python_3 (last edited 2020-01-24 19:13:42 by juliano)