As I said, our math.h attempts to manipulate preprocessor definitions
that it knows about.  If the system provides different preprocessor
definitions, or if, I suspect, the file you include before math.h
is not compatible with C++ APIs (e.g., it defines "isfinite()" in a
way that cannot be used to invoke it as "::isfinite()"), our math.h
will not do the right thing.

Hope things work for you now.
        Igor

Kirak Hong <hok...@gatech.edu> wrote on 12/02/2010 11:43:09 PM:

> Hi,
> 
> Somehow, if I put the <cvaux.h> from OpenCV library above <x10rt.h> then 
the
> compiler complains. Otherwise, it works fine.
> I think it's some trivial preprocessor definition problem or something 
since
> my friend had similar problem when using System S.
> The problem was two different libraries were using same preprocessor
> definitions and header files were broken.
> 
> Thanks,
> Kirak
> 
> On Thu, Dec 2, 2010 at 6:33 PM, Igor Peshansky <ig...@us.ibm.com> wrote:
> 
> > Kirak Hong <hok...@gatech.edu> wrote on 12/02/2010 05:17:39 PM:
> >
> > > Hi,
> > >
> > > I am trying to use my X10 class within an external CPP file.
> > > For example, I have X10 class as following :
> > >
> > > class X10Image
> > > > {
> > > >     public val width : Int;
> > > >     public val height : Int;
> > > >     public val channel : Int;
> > > >     public val img : Array[Int];
> > > >
> > > >     ... some methods ...
> > > > }
> > > >
> > >
> > > When I see the generated cc file, the class is declared in cpp as
> > following
> > > :
> > >
> > > class X10Image : public x10::lang::Object   {
> > > >     public:
> > > >     RTT_H_DECLS_CLASS
> > > >
> > > >     void _instance_init();
> > > >
> > > >     x10_int FMGL(width);
> > > >
> > > >     x10_int FMGL(height);
> > > >
> > > >     x10_int FMGL(channel);
> > > >
> > >
> > > To access the X10Image class within an external cpp file, I thought 
that
> > I
> > > can just include X10Image.h with x10rt.h, but the compiler complains
> > like
> > > following :
> > >
> > > x10c++: In file included from
> > > > /home/hokira/Projects/x10-2.1.0/include/x10aux/double_utils.h:16,
> > > >      from /home/hokira/Projects/x10-2.1.0/include/x10rt.h:38,
> > > >      from X10Image.h:4,
> > > >      from OpenCV.cpp:7:
> > > >      /home/hokira/Projects/x10-2.1.0/include/x10aux/math.h: In
> > function
> > > > ‘bool x10aux::math::isfinite(double)’:
> > > >      /home/hokira/Projects/x10-2.1.0/include/x10aux/math.h:83: 
error:
> > > > ‘::isfinite’ has not been declared
> > > >      /home/hokira/Projects/x10-2.1.0/include/x10aux/math.h: In
> > function
> > > > ‘bool x10aux::math::isfinite(float)’:
> > > >      /home/hokira/Projects/x10-2.1.0/include/x10aux/math.h:83: 
error:
> > > > ‘::isfinitef’ has not been declared
> > > >      /home/hokira/Projects/x10-2.1.0/include/x10aux/math.h: In
> > function
> > > > ‘int x10aux::math::signbit(double)’:
> > > >      /home/hokira/Projects/x10-2.1.0/include/x10aux/math.h:85: 
error:
> > > > ‘::signbit’ has not been declared
> > > >      /home/hokira/Projects/x10-2.1.0/include/x10aux/math.h: In
> > function
> > > > ‘int x10aux::math::signbit(float)’:
> > > >      /home/hokira/Projects/x10-2.1.0/include/x10aux/math.h:85: 
error:
> > > > ‘::signbitf’ has not been declared
> > > >
> > >
> > > Can anyone please give some comments on this?
> >
> > First, the X10 runtime implementation and the X10 generated code
> > require a POSIX subsystem.  Second, our math.h is carefully crafted
> > for the platforms we've tested on, and may not work on all platforms.
> >
> > What operating system and platform are you using?
> >        Igor
-- 
Igor Peshansky  (note the spelling change!)
IBM T.J. Watson Research Center
X10: Parallel Productivity and Performance (http://x10-lang.org/)
XJ: No More Pain for XML's Gain (http://www.research.ibm.com/xj/)
"I hear and I forget.  I see and I remember.  I do and I understand" -- 
Xun Zi

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to