Skip to content

Latest commit

 

History

History
121 lines (75 loc) · 3.58 KB

INSTALL_WINDOWS.md

File metadata and controls

121 lines (75 loc) · 3.58 KB

Installation on Windows

Supported compilers

At this moment, compilation has been tested on Windows 7&10, and is supported when using Visual Studio 2013. Patches for other versions are welcome.

Installation

Using a combination of pre-compiled binaries and self-compiled dependencies in a local workspace. To make things easier, use a MinGW shell for your editing work, and only use the Windows cmd for configuring and building. You might also need to disable the Windows firewall.

  1. Install cmake, make sure to select the "Add CMake to system path for all users" option in the install dialog box.

    CMake

  2. Make a directory to work in, e.g.:

     mkdir gz-ws
     cd gz-ws
    
  3. Download the following dependencies into that directory:

    Choose one of these options:

  4. Unzip each of them. The Windows unzip utility will likely create an incorrect directory structure, where a directory with the name of the zip contains the directory that has the source files. Here is an example:

     gz-ws/cppzmq-noarch/cppzmq
    

    The correct structure is

     gz-ws/cppzmq
    

    To fix this problem, manually move the nested directories up one level.

  5. Clone and prepare the Gazebo Math dependency:

     git clone https://github.com/gazebosim/gz-math
     cd gz-math
     mkdir build
    
  6. In a Windows Command Prompt, load your compiler setup, e.g.:

     "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
    
  7. In the Windows Command Promp, configure and build:

     cd gz-math\build
     ..\configure
     nmake install
    
  8. Clone and prepare the Gazebo Msgs dependency:

     git clone https://github.com/gazebosim/gz-msgs
     cd gz-msgs
     mkdir build
    
  9. In the Windows Command Prompt, configure and build:

     cd gz-msgs\build
     ..\configure
     nmake install
    
  10. Clone gz-transport:

     git clone https://github.com/gazebosim/gz-transport
     cd gz-transport
     mkdir build
    
  11. In the Windows Command Prompt, configure and build:

     cd gz-transport\build
     ..\configure
     nmake install
    

    You should now have an installation of gz-transport in gz-ws/gz-transport/build/install.

  12. Before running any executables, you need to modify your PATH to include the directories including your DLL dependencies to let Windows find dynamic libs (similar to LD_LIBRARY_PATH on Linux). Don't put quotes around the path, even if it contains spaces. E.g., if you're working in C:\My Stuff\gz-ws:

     set PATH=%PATH%;C:\My Stuff\gz-ws\ZeroMQ 4.0.4\bin;C:\My Stuff\gz-ws\gz-msgs\build\install\Release\lib
    
  13. Now build the examples:

     cd gz-ws\gz-transport\example
     mkdir build
     cd build
     ..\configure
     nmake
    
  14. Now try an example:

    1. In one Windows terminal run:

      responser

    2. In another Windows terminal run:

      requester

Run tests

  1. In the Windows Command Prompt, run the test suite:

    cd gz-transport\build ctest