[Insight-users] ITK with TCL Wrapping on OS X
Jon Harald Kaspersen
Jon.H.Kaspersen@unimed.sintef.no
Tue, 1 Apr 2003 20:45:03 +0200
--Apple-Mail-17-48542769
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
Hi,
I just wanted to share these instructions on how to get ITK build with
TCL wrapping on OS X.
1. Download http://www.gccxml.org/files/gccxml-0.4.2-cc1plus-osx.tar.gz
2. Place this file where you want it to be and unpack it.
3. Make a out-of-source bin directory, mkdir gccxml_osx
4. cd gccxml_osx
5. ../gccxml-0.4.2-cc1plus-osx/configure --enable-languages=c++
--disable-nls --without-libstdc --without-libstdcxx
6. make (The build process will take some time, so get a cup of coffee)
7. Download the gccxml frontend from cvs, instructions can be found at
http://www.gccxml.org/HTML/Download.html
8. Make a out-of-source bin directory, mkdir gccxml_bin
9.Run CMake, source dir gcc_xml and bin directory gccxml_bin.
10.make (Short build process)
11.Download Cable from
http://public.kitware.com/Cable/HTML/Download.html
12. again make a out-of-source bin directory, mkdir Cablebin
13.Run CMake, source dir Cable and bin directory Cablebin.
14. Verify that the TCL_INCLUDE_PATH is
/Library/Frameworks/Tcl.framework/Headers
and that TCL_LIBRARY is -framework Tcl, likewise for TK.
15. You will also probably have to set CMAKE_BACKWARDS_COMPATIBILITY to
1.4.
16. make, when CMake configures Cable without any red lines.
17. Copy the cc1plus (which is located in /gccxml_bin/gcc/) executable
so that it is located in the same directory as the gccxml executable
(which is in /gccxml_bin) and call this executable
gccxml_cc1plus:
cp gccxml_bin/gcc/cc1plus gccxml_bin/gccxml_cc1plus.
18. Now, run CMake on your ITK directory. Enable Tcl wrapping. Run
configure.
You will probably need to direct CMake to both Cablebin and the gccxml
executable.
Also enable use of system zlib. Again, make sure that TCL_INCLUDE_PATH,
TCL_LIBRARY, TK_INCLUDE_PATH and TK_LIBRARY are set as in 14.
19. make
20. If all goes well, you will be have an executable called itktcl in
your ITK/bin directory.
21. Set up the right resources for this executable by running:
/Developer/Tools/Rez Carbon.r -o itktcl
22. Make a symlink to the
Cablebin/CableTclFacility/libCableTclFacility.dylib library as :
ln -s Cablebin/CableTclFacility/libCableTclFacility.dylib
ITK/bin/libCableTclFacility.dylib
23. You should now be able to run the example Tcl scrips that can be
found in
Insight/Wrapping/Tcl/Executable. Try for example curvatureFlow.tcl
Hope I didn't forget anything.
Regards
Jon
========================================================
Jon Harald Kaspersen Tel: +47 73 59 75 89
Ph.D. Mechanical Engineering Mob: +47 93 03 65 90
Senior Scientist Pager +47 96 84 29 94
SINTEF Unimed - Ultralyd Fax: +47 73 59 78 73
N-7465 Trondheim
NORWAY e-mail: Jon.H.Kaspersen@unimed.sintef.no
WEB: http://www.us.unimed.sintef.no/
========================================================
--Apple-Mail-17-48542769
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
charset=US-ASCII
Hi,
I just wanted to share these instructions on how to get ITK build with
TCL wrapping on OS X.
1. Download http://www.gccxml.org/files/gccxml-0.4.2-cc1plus-osx.tar.gz
2. Place this file where you want it to be and unpack it.
3. Make a out-of-source bin directory, mkdir gccxml_osx
4. cd gccxml_osx
5. ../gccxml-0.4.2-cc1plus-osx/configure --enable-languages=c++
--disable-nls --without-libstdc --without-libstdcxx
6. make (The build process will take some time, so get a cup of coffee)
7. Download the gccxml frontend from cvs, instructions can be found at
http://www.gccxml.org/HTML/Download.html
8. Make a out-of-source bin directory, mkdir gccxml_bin
9.Run CMake, source dir gcc_xml and bin directory gccxml_bin.
10.make (Short build process)
11.Download Cable from
http://public.kitware.com/Cable/HTML/Download.html
12. again make a out-of-source bin directory, mkdir Cablebin
13.Run CMake, source dir Cable and bin directory Cablebin.
14. Verify that the TCL_INCLUDE_PATH is
/Library/Frameworks/Tcl.framework/Headers
and that TCL_LIBRARY is -framework Tcl, likewise for TK.
15. You will also probably have to set CMAKE_BACKWARDS_COMPATIBILITY
to 1.4.
16. make, when CMake configures Cable without any red lines.
17. Copy the cc1plus (which is located in /gccxml_bin/gcc/) executable
so that it is located in the same directory as the gccxml executable
(which is in /gccxml_bin) and call this executable
gccxml_cc1plus:
cp gccxml_bin/gcc/cc1plus gccxml_bin/gccxml_cc1plus.
18. Now, run CMake on your ITK directory. Enable Tcl wrapping. Run
configure.
You will probably need to direct CMake to both Cablebin and the gccxml
executable.
Also enable use of system zlib. Again, make sure that
TCL_INCLUDE_PATH,
TCL_LIBRARY, TK_INCLUDE_PATH and TK_LIBRARY are set as in 14.
19. make
20. If all goes well, you will be have an executable called itktcl in
your ITK/bin directory.
21. Set up the right resources for this executable by running:
/Developer/Tools/Rez Carbon.r -o itktcl
22. Make a symlink to the
Cablebin/CableTclFacility/libCableTclFacility.dylib library as :
ln -s Cablebin/CableTclFacility/libCableTclFacility.dylib
ITK/bin/libCableTclFacility.dylib
23. You should now be able to run the example Tcl scrips that can be
found in
Insight/Wrapping/Tcl/Executable. Try for example curvatureFlow.tcl
Hope I didn't forget anything.
Regards
Jon
========================================================
Jon Harald Kaspersen Tel: +47 73 59 75 89
Ph.D. Mechanical Engineering Mob: +47 93 03 65 90
Senior Scientist Pager +47 96 84 29 94
SINTEF Unimed - Ultralyd Fax: +47 73 59 78 73
N-7465 Trondheim
NORWAY e-mail: Jon.H.Kaspersen@unimed.sintef.no
WEB: <underline><color><param>1A1A,1A1A,FFFF</param>http://www.us.unimed.sintef.no/</color></underline>
========================================================
--Apple-Mail-17-48542769--