On Thu, Feb 19, 2009 at 3:47 AM, Michael Goffioul <
[email protected]> wrote:
> On Wed, Feb 18, 2009 at 7:27 PM, Joe Vornehm Jr. <[email protected]>
> wrote:
> > I'm running the MSVC build of Octave 3.0.3 + Octave-Forge 2008-08-31
> under
> > Windows XP. I am experimenting with the JHandles Java source to add
> > exponents to the axes to improve scaling. For instance, when I
> plot(1:10,
> > (1:10)*1e-20), I want reasonable y-axis tick labels and a "\times
> 10^{20}"
> > near the end of the y-axis.
> > I downloaded the JHandles source package and have made some initial
> edits,
> > and I would like to build jhandles.jar. I have tried running the
> configure
> > script included in the source tarball, but I can't get it to work. After
> > much experimentation, here are the steps I've taken:
> >
> > Install Octave 3.0.3 MSVC build to c:\gnu\octave-3.0.3, (to avoid spaces
> in
> > the pathname)
> > Install MSVC 8 (Visual Studio 8 Express Edition) to its default
> > Install MSYS/MinGW.to C:\MinGW
> > Start a MSVC 8 command prompt
> > Start MinGW's bash within that command prompt
> > Add c:\gnu\octave-3.0.3\bin to the path (called /c/gnu/octave-3.0.3/bin
> from
> > within MinGW)
> > Unpack the JHandles source tarball and change to its directory
> > Run "sh configure"
> >
> > Here's the output I get:
> >
> > checking for gcc... gcc
>
> The problem is there. You can't use gcc as compiler to compile
> octave package, while octave was compiled with MSVC8. To
> compile a package, you should use the "pkg" command from the
> octave prompt:
> - repackage your modified sources into a tar.gz file
> - run "pkg install <package-name>" from octave prompt
>
> I know this is a little be tedious if you only modified some .java
> files. In that case, I would simply run the java compiler by hand
> and copy the resulting jar file over the existing one.
>
> If you still want to run the configure script by hand, then you'll
> have to define the compiler and flags manually:
>
> ./configure CC=cc-msvc CXX=cc-msvc CFLAGS="-MD" \
> CXXFLAGS="-MD -EHsc"
>
> (Note: you might need some additional flags, I don't remember
> all of them).
>
> Michael.
>
Thanks to Michael and Tatsuro for timely, helpful replies. I have gotten
jhandles.jar to build, thanks to your help. If I can get the axes feature
working the way I want it to, I will submit a patch.
Here are some notes about the build process:
- Best approach seems to be Tatsuro's method, given in file 0004 on his
website, http://www.tatsuromatsuoka.com/octave/Eng/Win/index.html
- Build commands seem to work best when issued as "system" commands
within Octave.
- Initial setup can be done with system("sh -c \"configure\""). In order
to get gl2ps_java.c to compile properly, I needed to supply the correct
value for JAVA_INCS to configure, like this: system("sh -c
\"JAVA_INCS='-I\\\"C:/Program\\ Files/Java/jdk1.6.0_06/include\\\"
-I\\\"C:/Program\\ Files/Java/jdk1.6.0_06/include/win32\\\"' ./configure\").
- Compiles can be done with system("sh -c \"make build\""). It also
appears that system("sh -c \"make all\"") works as expected.
- Yes, configure reports that it's checking for the presence of gcc, but
cc-msvc is what actually gets called (I think by mkoctfile). The "fatal
error C1083" message is a MSVC-style error message.
- It looks like "-I. -Ic:/Software/VCLibs/include" is hard-coded into the
compiler flags in mkoctfile.
Thanks again.
Joe V.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev