Hi, Baseer.  Not sure what's the issue with your build, but here's a bit
of bash script which I use to build JCC with mingw on Windows:

echo "-- jcc --"
export PATH="$PATH:${javahome}/jre/bin/client"
echo "PATH is $PATH"
cd ../pylucene-3.0.*/jcc
# note that this patch still works for 3.0.1/3.0.2
patch -p0 < ${patchesdir}/jcc-2.9-mingw-PATCH
export JCC_ARGSEP=";"
export JCC_JDK="$WINSTYLEJAVAHOME"
export JCC_CFLAGS="-fno-strict-aliasing;-Wno-write-strings"
export JCC_LFLAGS="-L${WINSTYLEJAVAHOME}\\lib;-ljvm"
export 
JCC_INCLUDES="${WINSTYLEJAVAHOME}\\include;${WINSTYLEJAVAHOME}\\include\\win32"
export JCC_JAVAC="${WINSTYLEJAVAHOME}\\bin\\javac.exe"
${python} setup.py build --compiler=mingw32 install 
--single-version-externally-managed --root /c/ --prefix="${distdir}"
if [ -f jcc/jcc.lib ]; then
  cp -p jcc/jcc.lib "${sitepackages}/jcc/jcc.lib"
fi
# for 3.0.2 compiled with MinGW GCC 4.x and "--shared", we also need two
# GCC libraries
if [ -f /mingw/bin/libstdc++-6.dll ]; then
  install -m 555 /mingw/bin/libstdc++-6.dll "${distdir}/bin/"
  echo "copied libstdc++-6.dll"
fi
if [ -f /mingw/bin/libgcc_s_dw2-1.dll ]; then
  install -m 555 /mingw/bin/libgcc_s_dw2-1.dll "${distdir}/bin/"
  echo "copied libgcc_s_dw2-1.dll"
fi


The patch that I apply is this:

*** setup.py    2009-10-28 15:24:16.000000000 -0700
--- setup.py    2010-03-29 22:08:56.000000000 -0700
***************
*** 262,268 ****
          elif platform == 'win32':
              jcclib = 'jcc%s.lib' %(debug and '_d' or '')
              kwds["extra_link_args"] = \
!                 lflags + ["/IMPLIB:%s" %(os.path.join('jcc', jcclib))]
              package_data.append(jcclib)
          else:
              kwds["extra_link_args"] = lflags
--- 262,268 ----
          elif platform == 'win32':
              jcclib = 'jcc%s.lib' %(debug and '_d' or '')
              kwds["extra_link_args"] = \
!                 lflags + ["-Wl,--out-implib,%s" %(os.path.join('jcc', 
jcclib))]
              package_data.append(jcclib)
          else:
              kwds["extra_link_args"] = lflags

It makes sure to build the jcc.lib file so that I can use it in "shared" mode.

Bill

Reply via email to