
Mon, 10/03/2005 - 12:04
Hi ,
I apologize for reposting this help message but I am really facing problem with the inclusion of header files when I am creating my own sample application (I am creating a win32 dll which is internally calling open cascade funtions) .It seems to me the problem is coming when open cascade is calling internal macro's of window's such as this peice of code from Standard_math.hxx :
#ifdef WNT
# ifndef __MATH_WNT_H
# define __MATH_WNT_H
__Standard_API double __cdecl acosh ( double );
__Standard_API double __cdecl asinh ( double );
__Standard_API double __cdecl atanh ( double );
# define M_SQRT1_2 7.0710678118654752440E-1
# define M_PI_2 1.5707963267948966192E0
# endif /* __MATH_WNT_H */
#endif /* WNT */
where I am getting asinh as undefined
or
When Standard_Integer calls #define INT_MIN (-2147483647 - 1) /* minimum (signed) int value */ this statement from window's limits.h
where I am getting INT_MIN as undefined
I am sure there is a solution to this as the MFC sample dont seem to be having the same problem but I have gone through the settings in the MFC sample and I haven't been successful in finding a solution.
I would really appreciate some help on this.
With Regards,
Amitabh
Mon, 10/03/2005 - 15:23
Make sure you have WNT in the Preprocessor Definitions of your project settings. You will also see this in the MFC sample.
Mon, 10/03/2005 - 16:13
Hi Rob ,
Thanks a lot it worked . I would appreciate it if you could tell me what is the significance of adding WNT to preprocessor . I have been trying to look for it on the net but was unable to find any good explanation .Also in the other environments such as linux how do I need to handle this.
With Regards,
Amitabh
Mon, 10/03/2005 - 17:03
I don't remember where I found out about these the first time, but OCC requires WNT to read the correct headers on Win32. In addition, I have CSFDB defined, although I don't remember why. Although I don't use Linux, I do use Solaris. My Solaris makefile defines HAVE_CONFIG_H to insure that OCC reads the config.h from the inc directory.
Sorry I can't be of more help.
Mon, 10/03/2005 - 17:46
Thanks a lot Rob for the help .
If anybody knows any detailed information about WNT setting in
windows I would appreciate it if you could share it with me.
With Regards,
Amitabh
Mon, 10/03/2005 - 18:06
the reason of this preprocessor directive is because the OpenCASCADE code should compile on different plateforms.
in the code, you have something like
#ifdef WNT
//headers or code specific to windows
#elif IRIX
//headers or code specific to SGI IRIX
#endif
an example can be found in the OSD package, ex : OSD_SharedLibrary.cxx where you have :
#ifndef WNT
//unix compliant code
#else
//specific windows code
#endif
HTH,
Stephane
http://www.exotk.org
Mon, 10/03/2005 - 19:17
Hi Stephane ,
Thanks for the input . Would you be knowing where the declaration of WNT happens and how is it used .That is it would be great if you could give me some more details specifically about WNT
With Regards,
Amitabh
Mon, 10/03/2005 - 19:36
you have to specify it as preprocessor directive in your VisualC++ project Settings.
Mon, 10/03/2005 - 19:42
Hi Stephane ,
I had learnt that from Rob.What I wanted to know was how does VC++ treats it internally . When we specify WNT in the preprocessor setting what does VC++ do with it.Does it consider it as equivalent to having a #define WNT in one of the headers .(if I can put it like that)
With Regards,
Amitabh
With Regards,
Amitabh
Mon, 10/03/2005 - 19:45
it is like a global #define
Mon, 10/03/2005 - 19:51
Thanks Stephane just wanted confirm that .Thanks a lot for the help
With Regards,
Amitabh