再インストール
ANT、ANT-CONTRIB、CPPTASKS
- Java SE Development Kit 6u24 (JDK;32bit版)
- ant 1.8.2(binary)
- Xerces-J2.11.0(binary)
- 展開し、下記5ファイルを$ANT_HOME/libへコピー
- resolver.jar、serializer.jar、xercesImpl.jar、xercesSamples.jar、xml-apis.jar
- ant-contrib1.0b3(binary)
- 展開し、ant-contribフォルダごと$ANT_HOME/へコピー
- cpptasks-1.0b5(source)
- 展開し、build.xmlのあるフォルダにて、「ant」実行
- target/lib/cpptasks.jarを$ANT_HOME/libへコピー
ビルド環境チェック
チェック用C++ソース
#include <iostream> #include <iomanip> using namespace std; main() { cout <<"Hello, world!" <<endl; }
チェック用 build.xml
<?xml version="1.0" encoding="UTF-8"?> <project name="CheckANT" default="build" basedir="." xmlns:cpptasks="antlib:net.sf.antcontrib.cpptasks"> <target name="build"> <cpptasks:cc outtype="executable" subsystem="console" outfile="hello"> <fileset dir="." includes="*.cpp"/> <libset libs="stdc++"/> <linkerarg value="--enable-auto-import"/> </cpptasks:cc> </target> </project>
実行
etc@etcpc /cygdrive/e/home(etc)/projects/anttest $ ant Buildfile: E:\home(etc)\projects\anttest\build.xml build: Starting dependency analysis for 1 files. 1 files are up to date. 0 files to be recompiled from dependency analysis. 0 total files to be compiled. Starting link BUILD SUCCESSFUL Total time: 0 seconds etc@etcpc /cygdrive/e/home(etc)/projects/anttest $ ./hello.exe Hello, world!
E:\home(etc)\projects\anttest>hello.exe Hello, world!
.bashrc抜粋*4
................................... # source the system wide bashrc if it exists if [ -e /etc/bash.bashrc ] ; then source /etc/bash.bashrc fi # source the users bashrc if it exists if [ -e "${HOME}/.bashrc" ] ; then PATH="/cygdrive/c/MinGW/bin:$PATH" source "${HOME}/.bashrc" fi ...................................
windows環境変数 Pathの抜粋
Path=C:\MinGW\bin;C:\cygwin\usr\local\bin;C:\cygwin\usr\local\sbin;C:\cygwin\usr\bin;....