Editing
Software Development Platforms
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Development on Windows= ==Installing Development Tools== ===Compilers=== ====Microsoft Visual Studio==== Visual Studio is Microsoft's standard compiler and IDE. The Express version is free. Just search for "Microsoft Visual Studio Express" to find the correct download site. Make sure you get Visual C++ 2008 and not the beta for the 2010 version, which fails to compile ParaView. Note that the default installation of Visual Studio does not include the 64 bit compiler and tools, so you will definitely want to modify this. Update: Visual Studio C++ 2008 is broken for reading/writing files larger than 4GB. Visual Studio 2010 must be used. The Express version does not include 64 bit support however. You must install the Windows SDK from http://msdn.microsoft.com/en-us/windows/bb980924 . I installed this alongside Visual Studio Express and it didn't seem to confuse CMake. ====MinGW==== MinGW is a port of gcc to windows. Installation is somewhat intensive. Follow the instructions at http://www.mingw.org/wiki/Getting_Started . NOTE: If you want to build anything with Qt, and you have downloaded a binary version of Qt, then you must use MinGW instead of Visual Studio. This is because the binary version of Qt are built with MinGW and C++ compilers and not cross-compatible on Windows. I actually recommend using Visual Studio and building Qt from source, but either route will work. === ConEmu === Not required, but makes working in a terminal in Windows much nicer. http://code.google.com/p/conemu-maximus5/ ===CMake=== You can obtain a Windows installer for CMake from http://www.cmake.org/ . ===Subversion (SVN)=== You can obtain a Windows installer for SVN from http://subversion.apache.org/ . Graphical windows clients (such as TortoiseSVN) are also available from there. See *[[Subversion (SVN)]] . ===git=== Get from http://git-scm.com . ===Python=== You can get python from http://www.python.org/ . ===Perl=== You'll need Perl to compile OpenSSL. You can get Perl from http://www.activestate.com/activeperl . The Community edition is free. Get the x64 version (assuming you want 64 bit). ===zlib=== Get the zip file from http://www.zlib.net/ . Unzip it. Start a Visual Studio Command Prompt (64 bit). nmake -f win32/Makefile.msc ===OpenSSL=== Ignore the stuff below, and just install the version from http://www.slproweb.com/products/Win32OpenSSL.html . Download the source code from http://www.openssl.org . You'll need to have Perl installed to compile SSL. Follow the instructions in the file INSTALL.W64 . It looks more or less like this. Start a Visual Studio 2008 x86 Command prompt. Note that nt.mak makes static libraries. They will be put into the out32 directory. perl Configure VC-WIN64A ms\do_win64a nmake -f ms\nt.mak cd out32 ..\ms\test ===numpy and scipy=== There aren't any official binaries for numpy and scipy for 64 bit Windows yet. If you want 64 bit versions, you can get them from http://www.lfd.uci.edu/~gohlke/pythonlibs/ . ===Qt=== You will have to build from source, because Nokia only supplies 32 bit builds at the current time. Get the file qt-everywhere-opensource-src-4.6.3.zip from http://get.qt.nokia.com/qt/source/ . Unpack it. Go to Visual Studio 2005->Visual Studio tools in the start menu and click on Visual Studio 2005 x64 Win64 Command Prompt. In the Command Prompt, go to the 64-bit Qt directory you just extracted. Once you are in the directory, type: configure.exe -qt-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg Now to start the compilation, run nmake by typing: nmake Once the compilation is complete, then type: nmake install ===boost=== Get it from http://boost.org . Unzip boost_1_52_0.zip . Open a Visual Studio 2008 64 bit Command Prompt. cd boost_1_45_0 bootstrap bjam --build-dir=build address-model=64 architecture=x86 link=static -j 4 stage For the Intel compilers, open an Intel Compilers 64 bit Command Prompt and do this use this: bjam --build-dir=build_intel toolset=intel-13.0 address-model=64 architecture=x86 link=static -j 4 stage ===TK=== Is required by VTK. Get from http://www.activestate.com/activetcl ===VTK=== Get the zipped source code from http://vtk.org . Unpack it. mkdir build cd build cmake-gui .. Then click the solution file to build it. ===HDF5 and netCDF=== Get HDF5 from http://www.hdfgroup.org/downloads/index.html . Turns out we need to build HDF5 statically to link to netCDF on Windows. Don't know why. Here are some interesting cmake options: {| border="1" cellpadding="2" cellspacing="0" |- ! option ! Setting |- valign="top" | BUILD_SHARED_LIBS || OFF |- valign="top" | CMAKE_BUILD_TYPE || Release |- valign="top" | CMAKE_INSTALL_PREFIX || C:/Users/eric/Programs/HDF5-1.8.10-static |- valign="top" | ENABLE_DAP || OFF |- valign="top" | HDF5_BUILD_CPP_LIB || OFF |- valign="top" | HDF5_BUILD_FORTRAN || OFF |- valign="top" | HDF5_BUILD_HL_LIB || ON |- valign="top" | HDF5_BUILD_TOOLS || ON |- valign="top" | HDF5_ENABLE_Z_LIB_SUPPORT || ON |- valign="top" | ZLIB_INCLUDE_DIR || C:/Users/eric/source/zlib-1.2.7 |- valign="top" | ZLIB_LIBRARY || C:/Users/eric/source/zlib-1.2.7/zlib.lib |} Build in the usual way for CMake. Currently, 64 bit Windows build of netcdf can only be built with CMake. However, netCDF 4.2.1.1 doesn't provide cmake, so get release candidate of 4.3 from http://www.unidata.ucar.edu/downloads/netcdf/netcdf-rc/index.jsp . Configure with cmake and point it to the static HDF5 libraries. {| border="1" cellpadding="2" cellspacing="0" |- ! option ! Setting |- valign="top" | BUILD_SHARED_LIBS || ON |- valign="top" | CMAKE_BUILD_TYPE || RELEASE |- valign="top" | CMAKE_INSTALL_PREFIX || C:/Users/eric/Programs/netCDF-4.3.0-rc2 |- valign="top" | HDF5_HL_LIB || C:/Users/eric/Programs/hdf5-1.8.10-patch1-static/lib/hdf5_hl.lib |- valign="top" | HDF5_INCLUDE_DIR || C:/Users/eric/Programs/hdf5-1.8.10-patch1-static/include |- valign="top" | HDF5_INCLUDE_DIRS || C:/Users/eric/Programs/hdf5-1.8.10-patch1-static/include |- valign="top" | HDF5_LIB || C:/Users/eric/Programs/hdf5-1.8.10-patch1-static/lib/hdf5.lib |- valign="top" | ZLIB_INCLUDE_DIR || C:/Users/eric/source/zlib-1.2.7 |- valign="top" | ZLIB_LIBRARY || C:/Users/eric/source/zlib-1.2.7/zlib.lib |- valign="top" | ENABLE_XGETOPT || ON |} The files XGetopt.h and XGetopt.c are missing. They need to go into 3 directories. Start up the Visual Studio project, but then change the compiler to Intel C++ compilers (not sure why it fails with the Microsoft compiler). Get the python module netcdf4-python from http://code.google.com/p/netcdf4-python/ . Use some other operating system to unpack the tar file, copy it to Windows. I like to rename the directory name to have python in it (e.g. python-netCDF4-1.0.2). The setup.py script needs to be seriously modified: This line: if line.startswith('#define H5_VERSION'): hdf5_version = line.split()[2] Should be changed to: if line.startswith('#define H5_VERSION'): hdf5_version = line.split()[2] elif line.startswith('#define VERSION'): hdf5_version = line.split()[2] This line: libs = ['netcdf','hdf5_hl','hdf5','z'] should be changed to: libs = ['netcdf'] This line: extensions = [Extension("netCDF4",["netCDF4.c"],libraries=libs,library_dirs=lib_dirs,include_dirs=inc_dirs,runtime_library_dirs=lib_dirs)] Should be changed to extensions = [Extension("netCDF4",["netCDF4.c"],libraries=libs,library_dirs=lib_dirs,include_dirs=inc_dirs)] Start a Visual Studio 64 bit command prompt. set HDF5_INCDIR=C:\Users\eric\Programs\HDF5-1.8.10-patch1-static\include set HDF5_LIBDIR=C:\Users\eric\Programs\HDF5-1.8.10-patch1-static\lib set NETCDF4_INCDIR=C:\Users\eric\Programs\netCDF-4.3.0-rc2\include set NETCDF4_LIBDIR=C:\Users\eric\Programs\netCDF-4.3.0-rc2\lib If using something other than Visual Studio 2008, you will also need something like this: set VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\ See http://stackoverflow.com/questions/2667069/cannot-find-vcvarsall-bat-when-running-a-python-script . python setup.py build python setup.py install --prefix C:\Users\eric\Programs\python-netcdf ===NSIS=== NSIS is a Windows installer that is required if you want to create package installers for CMake projects. This includes ParaView. Get it from http://nsis.sourceforge.net/ . ===ParaView=== We are going to do an install from source because that is necessary if we want to build plugins. Build instructions are at http://paraview.org/Wiki/ParaView . I basically follow those. Download paraview-3.10.1.zip from http://www.paraview.org/paraview/resources/software.html . Unzip it to some place that you want to use for building. Also create a folder for building. I usually make a folder "build" as a sub-folder in the source tree of paraview (e.g. C:\Documents and Settings\eric\My Documents\source\paraview-3.10.1\build). Start CMake. Set the source code and build binaries directories. Click configure. Select your compiler. Here are the cmake options that I typically choose: {| border="1" cellpadding="2" cellspacing="0" |- ! option ! Setting |- valign="top" | BUILD_SHARED_LIBS || ON |- valign="top" | CMAKE_INSTALL_PREFIX || C:/Program Files/paraview-3.10.1 |- valign="top" | PARAVIEW_BUILD_QT_GUI || ON |- valign="top" | PARAVIEW_ENABLE_PYTHON || ON |- valign="top" | PARAVIEW_USE_MPI || OFF |- valign="top" | QT_QMAKE_EXECUTABLE || C:/Qt/4.6.3/qt/bin/qmake.exe |} Once you've Configured and Generated with CMake, start up Visual Studio by double-clicking on the ParaView.sln in the build directory. In Visual Studio, select the ALL_BUILD project, make sure the type of release to be built is Release and not Debug (that is on the toolbar), then select Build -> Build ALL_BUILD. ===gtest=== Get the zipped code from http://code.google.com/p/googletest/ . Unpack it. mkdir build cd build cmake-gui .. Then click the solution file to build it. ==Tips== ===Working with objects and libraries=== To find out what kind of library a particular file is, use dumpbin /headers The machine type is almost the first line you'll get. It will be 14c for x86 and 8664 for x64. To list the exports of a library, use dumpbin /EXPORTS foo.lib [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']]
Summary:
Please note that all contributions to bone.wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BoneWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
associated-pages
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Documents
Recent changes
Help
Tools
What links here
Related changes
Page information