[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: qh_new_qhull calling conventions
From: |
Tatsuro MATSUOKA |
Subject: |
Re: qh_new_qhull calling conventions |
Date: |
Wed, 1 Feb 2012 18:59:14 +0900 (JST) |
Hello
After the below patch applied,
--- qhulltst.cc 2012-02-01 14:34:07 +0900
+++ qhulltst_m.cc 2012-02-01 18:52:08 +0900
@@ -43,7 +43,7 @@
// Replace the 0 pointer with stdout for debugging information.
#ifdef Q2009FIX
- FILE *outfile = fopen ("/dev/null", "w");
+ FILE *outfile = fopen ("NUL", "w");
#else
FILE *outfile = 0;
#endif
The test result of qhulltst2009FIX_m is :
$ ./qhulltst2009FIX_m
Number of facets: 12
Options selected for Qhull 2009.1.3 2011/12/06:
Qtriangulate incidence _pre-merge _zero-centrum _max-width 1
Error-roundoff 1.4e-015 _one-merge 9.7e-015 _near-inside 4.9e-014
Visible-distance 2.8e-015 U-coplanar-distance 2.8e-015
Width-outside 5.5e-015 _wide-facet 1.7e-014
This result is the same as that in Ubuntu.
On the MinGW (perhaps windows), "/dev/null" is not effective but "NUL" is.
Regards
Tatsuro
--- On Wed, 2012/2/1, Tatsuro MATSUOKA wrote:
> Hello Marco
>
> Thanks! I could build all executable files.
>
> Hello Rik
>
> The results are for MinGW.
>
> $ PATH=/c/Programs/OctaveLibs/bin:$PATH ./qhulltst2012
> Number of facets: 12
> Options selected for Qhull 2012.1 2012/01/26:
> run-id 126441156 Qtriangulate incidence _pre-merge _zero-centrum
> _max-width 1 Error-roundoff 1.4e-015 _one-merge 9.7e-015
> _near-inside 4.9e-014 Visible-distance 2.8e-015
> U-coplanar-distance 2.8e-015 Width-outside 5.5e-015 _wide-facet 1.7e-014
>
> $ ./qhulltst2009
> Number of facets: 6
> Options selected for Qhull 2009.1.3 2011/12/06:
> Qtriangulate incidence _pre-merge _zero-centrum _max-width 1
> Error-roundoff 1.4e-015 _one-merge 9.7e-015 _near-inside 4.9e-014
> Visible-distance 2.8e-015 U-coplanar-distance 2.8e-015
> Width-outside 5.5e-015 _wide-facet 1.7e-014
>
> $ ./qhulltst2009FIX
> Number of facets: 6
> Options selected for Qhull 2009.1.3 2011/12/06:
> Qtriangulate incidence _pre-merge _zero-centrum _max-width 1
> Error-roundoff 1.4e-015 _one-merge 9.7e-015 _near-inside 4.9e-014
> Visible-distance 2.8e-015 U-coplanar-distance 2.8e-015
> Width-outside 5.5e-015 _wide-facet 1.7e-014
>
> Regards
>
> Tatsuro
>
> --- On Wed, 2012/2/1, marco atzeri wrote:
>
> > On 2/1/2012 7:16 AM, Tatsuro MATSUOKA wrote:
> > > Hello
> > >
> > > --- On Wed, 2012/2/1, Rik wrote:
> > >
> > >> Octave Maintainer's:
> > >>
> > >> This should be solved before the 3.6.1 release. Does anybody have a good
> > >> way to create a throw-away FILE pointer?
> > >>
> > >> The "/dev/null" solution would be fine except I'm not certain it would
> > >> work
> > >> on MinGW and Cygwin platforms. My little bit of a web search seemed to
> > >> indicate that they DO implement this special file.
> > >>
> > >> Otherwise, we could always use fopen with a temporary file name created
> > >> through tmpnam and then delete it afterwards but this seems like a lot of
> > >> work for every convhull, voronoi, or delaunay call.
> > >>
> > >> I've attached my test case and Makefile. On my machine I had Qhull2009
> > >> installed by the package manager in /usr and Qhull2012 installed by hand
> > >> in
> > >> /usr/local and used -L options to flip between the two.
> > >>
> > >> --Rik
> > > Hello
> > >
> > >
> > > I have install qhull-2009 to /home/octaves/qhull-2009 and tried to build
> > > the test executable files.
> > >
> > > However,
> > > $ make -i
> > > g++ -o qhulltst2012 -DQ2012 -I/c/Programs/OctaveLibs/include -lqhull
> > > -L/c/Programs/OctaveLibs/lib qhulltst.cc
> > > g++ -o qhulltst2009 -lqhull -I/home/octaves/qhull-2009/include
> > > -L/home/octaves/qhull-2009/lib qhulltst.cc
> > > C:\Users\Tatsu\AppData\Local\Temp\cciYy8su.o:qhulltst.cc:(.text+0x10f):
> > > undefined reference to `qh_new_qhull'
> > > C:\Users\Tatsu\AppData\Local\Temp\cciYy8su.o:qhulltst.cc:(.text+0x11d):
> > > undefined reference to `qh_qh'
> > > collect2: ld returned 1 exit status
> > > make: [qhulltst2009] Error 1 (ignored)
> > > g++ -o qhulltst2009FIX -DQ2009FIX -lqhull
> > > -I/home/octaves/qhull-2009/include -L/home/octaves/qhull-2009/lib
> > > qhulltst.cc
> > > C:\Users\Tatsu\AppData\Local\Temp\ccu80uJ3.o:qhulltst.cc:(.text+0x11f):
> > > undefined reference to `qh_new_qhull'
> > > C:\Users\Tatsu\AppData\Local\Temp\ccu80uJ3.o:qhulltst.cc:(.text+0x12d):
> > > undefined reference to `qh_qh'
> > > collect2: ld returned 1 exit status
> > > make: [qhulltst2009FIX] Error 1 (ignored)
> > >
> > > I could not get executable files linked with qhull-2009.
> > > Am I wrong?
> > >
> > > Regards
> > >
> > > Tatsuro
> > >
> >
> > -lqhull should be moved at the end
> > -----------------------------------------------------
> > qhulltst2012:
> > g++ -o $@ -DQ2012 -I/usr/local/include/ -L/usr/local/lib
> > qhulltst.cc -lqhull
> >
> > qhulltst2009:
> > g++ -o $@ qhulltst.cc -lqhull
> >
> > qhulltst2009FIX:
> > g++ -o $@ -DQ2009FIX qhulltst.cc -lqhull
> > ---------------------------------------------------------
> >
> > with that on cygwin
> >
> > $ ./qhulltst2009.exe
> > Options selected for Qhull 2010.1 2010/01/14:
> > run-id 104171881 Qtriangulate incidence _pre-merge _zero-centrum
> > _max-width 1 Error-roundoff 1.4e-15 _one-merge 9.7e-15
> > _near-inside 4.9e-14 Visible-distance 2.8e-15 U-coplanar-distance
> > 2.8e-15
> > Width-outside 5.5e-15 _wide-facet 1.7e-14
> > Number of facets: 6
> >
> > $ ./qhulltst2009FIX.exe
> > Options selected for Qhull 2010.1 2010/01/14:
> > run-id 104339951 Qtriangulate incidence _pre-merge _zero-centrum
> > _max-width 1 Error-roundoff 1.4e-15 _one-merge 9.7e-15
> > _near-inside 4.9e-14 Visible-distance 2.8e-15 U-coplanar-distance
> > 2.8e-15
> > Width-outside 5.5e-15 _wide-facet 1.7e-14
> > Number of facets: 12
> >
> > I have not yet built a Qhull 2012
> >
> > Regards
> > Marco
> >
>