Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #8061
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 |
| Date | 2011-09-15 10:17 -0700 |
| Organization | Canadian Mind Products |
| Message-ID | <3fc477pu50dtv7f56dk7ko9kcbk0f0nrr7@4ax.com> (permalink) |
| References | <62e49dff-c206-4a0a-910a-9bc6c72911b0@w8g2000yqi.googlegroups.com> |
On Thu, 15 Sep 2011 05:41:17 -0700 (PDT), François Rappaz
<rappazf@gmail.com> wrote, quoted or indirectly quoted someone who
said :
>
>Does anybody has a clue on how to correct this ? (beside of using my
>old dll with using a 32Bits JRE)
here is my ant script for compiling JNI with Windows Express (free)
It only 32-bit. However, the SET vars might jostle something in your
mind.
DevEnvDir=F:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\
INCLUDE=F:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include;C:\Program Files (x86)\Microsoft
SDKs\Windows\v7.0A\Include;E:\Program Files
(x86)\Java\jdk1.7.0\include;E:\Program Files
(x86)\Java\jdk1.7.0\include\win32
JAVA_HOME=E:\Program Files\java\jdk1.7.0
LIB=F:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\lib;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
LIBPATH=C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Windows\Microsoft.NET\Framework\v3.5;F:\Program
Files (x86)\Microsoft Visual Studio 10.0\VC\LIB;
VS100COMNTOOLS=F:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\Tools\
<?xml version="1.0"?>
<!-- REBUILD.XML simple pcclock 7.7 build that presumes all files are
already in the project directory. -->
<!-- Build with ant -f rebuild.xml zip jet -->
<!-- Compile and jar pcclock using ANT -->
<!-- Invoke with [ant clean] to erase class files and start over. -->
<!-- Invoke with [ant compile] to just compile. -->
<!-- Invoke with [ant javah] to regenerate jni *.h files. -->
<!-- Invoke with [ant javadoc] to generate javadoc. -->
<!-- Invoke with [ant jar] to compile and create jar files. -->
<!-- For details of ANT use, see http://mindprod.com/jgloss/ant.html
-->
<!-- D E F I N I T I O N S -->
<!-- ANT.project.dir is com/mindprod/pcclock -->
<!-- basedir is E:/ -->
<project name="pcclock" basedir="E:/" default="jar">
<!-- C L E A N -->
<target name="clean">
<echo message=" ::: pcclock ::: deleting files to force
regeneration." />
<delete>
<fileset dir="com/mindprod/pcclock" includes="**/*.class" />
<fileset dir="com/mindprod/pcclock" includes="**/*.jar" />
<!-- leave Jet *.exe. Old versions are still useful during the
build. -->
</delete>
</target>
<!-- C O M P I L E -->
<target name="compile">
<echo message=" ::: pcclock ::: compiling Java tree with
target=1.5" />
<javac source="1.5" target="1.5" srcdir="com/mindprod/pcclock"
sourcepath="${basedir}" classpath="${basedir}" debug="on"
includeAntRuntime="false">
<compilerarg value="-Xlint:unchecked" />
<compilerarg value="-Xlint:fallthrough" />
<compilerarg value="-Xlint:deprecation" />
</javac>
</target>
<!-- J A V A H -->
<target name="javah" depends="compile">
<echo message=" ::: pcclock ::: building jni stubs." />
<javah class="com.mindprod.pcclock.PCClock"
outputfile="com/mindprod/pcclock/nativepcclock/pcclock.h" />
<echo message="You must compile the C/C++ JNI manually, copy to
java.libary.path somewhere" />
</target>
<!-- G A T H E R -->
<target name="gather" depends="compile">
<!-- nothing to do for non-distributed build -->
</target>
<!-- J A R -->
<!-- Make apache-ant-1.8.1\lib\GenJar.jar known to ANT -->
<!-- See http://mindprod.com/jgloss/genjar.html for details -->
<taskdef resource="genjar.properties" />
<target name="jar" depends="gather">
<echo message=" ::: pcclock ::: genjar finding
dependencies and creating jar." />
<genjar jarfile="com/mindprod/pcclock/pcclock.jar">
<!-- include all classes in the package -->
<class>
<fileset dir="${basedir}">
<!-- include all the classes in com/mindprod/pcclock -->
<include name="com/mindprod/pcclock/*.class" />
<!-- all dependent classes will be automatically included -->
</fileset>
</class>
<resource
file="com/mindprod/pcclock/nativepcclock/Release/nativepcclock.dll"
package="" />
</genjar>
<!-- S I G N -->
<!-- get _your_ password from set jarsignerpassword=sesame -->
<!-- get _your_ code-signing certificate from set
cert=mindprodcert2011dsa -->
<property environment="env" />
<signjar jar="com/mindprod/pcclock/pcclock.jar"
alias="${env.cert}" keystore="${env.keystore}/.keystore"
storepass="${env.jarsignerpassword}" />
</target>
<!-- P O S T J A R -->
<target name="postjar" depends="jar">
<!-- nothing to do -->
</target>
<!-- J E T -->
<!-- Dummy. Not using Jet -->
<target name="jet">
</target>
<!-- P R E J A V A D O C . -->
<target name="prejavadoc">
<echo message=" ::: pcclock ::: avoid regenerating Javadoc
if already done." />
<uptodate property="javadoc.uptodate"
targetfile="com/mindprod/pcclock/javadoc/index.html">
<srcfiles dir="com/mindprod/pcclock" includes="**/*.java" />
</uptodate>
</target>
<!-- J A V A D O C -->
<target name="javadoc" depends="prejavadoc" unless="javadoc.uptodate">
<echo message=" ::: pcclock ::: generating Javadoc." />
<!-- prepare javadoc -->
<javadoc
author="true"
destdir="com/mindprod/pcclock/javadoc"
packagenames="com.mindprod.pcclock.*"
sourcepath="E:/"
use="true"
access="package"
version="true" />
</target>
<!-- Z I P -->
<target name="zip" depends="javadoc,jar">
<!-- not distributing a zip -->
</target>
<!-- P O S T Z I P -->
<target name="postzip" depends="zip,postjar">
<!-- not distributing a zip -->
</target>
</project>
--
Roedy Green Canadian Mind Products
http://mindprod.com
Your top priority should be fixing bugs. If you carry on development,
you are just creating more places you will have to search for them.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Compiling a dll for 64-bits W7 with cygwin and mingw-w64 François Rappaz <rappazf@gmail.com> - 2011-09-15 05:41 -0700
Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 Roedy Green <see_website@mindprod.com.invalid> - 2011-09-15 10:17 -0700
Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 François Rappaz <rappazf@gmail.com> - 2011-09-16 00:18 -0700
Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 Roedy Green <see_website@mindprod.com.invalid> - 2011-09-16 14:40 -0700
Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 Lew <lewbloch@gmail.com> - 2011-09-16 06:12 -0700
Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 François Rappaz <rappazf@gmail.com> - 2011-09-16 07:32 -0700
Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 Roedy Green <see_website@mindprod.com.invalid> - 2011-09-16 14:47 -0700
Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 Roedy Green <see_website@mindprod.com.invalid> - 2011-09-16 16:51 -0700
Re: Compiling a dll for 64-bits W7 with cygwin and mingw-w64 François Rappaz <rappazf@gmail.com> - 2011-09-22 07:04 -0700
csiph-web