Difference between revisions of "OpenIGTLink/Library/Build"

From NAMIC Wiki
Jump to: navigation, search
Line 4: Line 4:
  
 
== Linux / Mac OS X ==
 
== Linux / Mac OS X ==
* mkdir OpenIGT
+
=Build Open IGT Link Example program=
* cd OpenIGT
+
 
* svn co http://www.na-mic.org/svn/NAMICSandBox/trunk/OpenIGTLink/ OpenIGTLink
+
#In the Open IGT Link Library, there is an example program that sends dummy tracking data through the Open IGT Link connection.
* mkdir build
+
#(Before start the following process, please make sure that you are in the different directory from the one where you worked on the 3D Slicer #Open IGT Link module; the directory name is the same!)
* cd build
+
 
* cmake ../OpenIGTLink
+
First obtain the source code from the repository. In Linux and Mac, run:
* make
+
 
* Testing/igtlSocketTest
+
  $ svn co http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink OpenIGTLink
(For the moment this will not do anything, as the igtlSocketTest.cxx contains only "return EXIT_SUCCESS;")
+
 
 +
Then configure using CMake. The library requires CMake version higher than 2.4.
 +
  $ mkdir OpenIGTLink-build
 +
  $ cd OpenIGTLink-build
 +
  $ ccmake ../OpenIGTLink
 +
 
 +
Then CMake configuration screen shows up on your terminal. Normally, you don't need to change any options. Just press the 'c' key (configure) followed by the 'g' key (generate). and quit the configuration screen. Now you are ready to build the software.
 +
 
 +
  $ make
  
 
== Windows ==
 
== Windows ==

Revision as of 20:17, 10 July 2008

Home < OpenIGTLink < Library < Build

<< OpenIGTLink | Library

Step by step instructions to build the basic platform

Linux / Mac OS X

Build Open IGT Link Example program

  1. In the Open IGT Link Library, there is an example program that sends dummy tracking data through the Open IGT Link connection.
  2. (Before start the following process, please make sure that you are in the different directory from the one where you worked on the 3D Slicer #Open IGT Link module; the directory name is the same!)

First obtain the source code from the repository. In Linux and Mac, run:

 $ svn co http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink OpenIGTLink

Then configure using CMake. The library requires CMake version higher than 2.4.

 $ mkdir OpenIGTLink-build
 $ cd OpenIGTLink-build
 $ ccmake ../OpenIGTLink

Then CMake configuration screen shows up on your terminal. Normally, you don't need to change any options. Just press the 'c' key (configure) followed by the 'g' key (generate). and quit the configuration screen. Now you are ready to build the software.

 $ make

Windows

  • Download SVN Windows client if you don't have one already
  • You will also need CMake and a C/C++ compiler as Microsoft Visual C++
  • Download out the source code from SVN
  • Run CMake
    • Where is the source code: C:\Devel\OpenIGT\OpenIGTLink
    • Where to build the binaries: C:\Devel\OpenIGT\build
    • Click "Configure" and select your compiler (usually just click "OK")
    • Message: "Build directory does not exit, should I create it?" - click "OK"
    • It might give a "pdflatex" error, just ignore it for now
    • Click "Configure"
    • Click "OK" to close CMake
  • Start Visual C and compile the project (C:\Devel\OpenIGT\build\OpenIGTLink.sln)

If all went OK you will have the executable and the library:

  • C:\Devel\OpenIGT\build\Testing\debug\igtlSocketTest.exe
  • C:\Devel\OpenIGT\build\Source\debug\OpenIGTLink.lib