I have been attempting to compile MathGL on windows using a Borland builder 6
after generating the makefile with Cmake. Almost immediately I get an error
saying the the symbol 'NAN' is undefined. It appears to be defined in define.h
and the error occurs in type.h. Has anyone else encountered this or have any
ideas as what might be causing it, I'm not sure how it could be undefined.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
It look as Borland compiler don't define NAN (similarly to MS VisualStudio).
So, if you give me the name of definition which Borland determines itself
(like _MSC_VER for VisualStudio) then I add NAN definition for Borland
compiler too.
Alternatively you can just use
#define NAN 0./0.
This is formally correct but may produce a lot of warnings by compiler.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reply. Your workaround worked. I think that the predefined ID
for Borland is BORLANDC.
I have hit another problem which is the dependence on unistd.h. I believe this
file is not used in windows (although I guess its in MinGW). Is there a
windows equivalent of this or will copying the file from MinGW work? I'm not
familliar enough which what it does to know.
I'm guessing this would be easier if I compiled/downloaded binaries for MingGW
although I guess I won't be able to link against a Borland Builer 6 project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you. I add BORLANDC everywhere -- with _MS_VER (as for MS
VisualStudio).
Concerning unistd.h. It is header file which contain some system routines
(like chdir() or system()). I've just clean the code (SVN rev.461) for
removing unused inclusion. All other places now use io.h and direct.h only.
Note, that you can use existed win32 binaries as is -- just make .lib from .dll. But be careful with using MathGL widgets under Borland Builder. Most
probably they will not work due to difference in naming and in event handling.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been attempting to compile MathGL on windows using a Borland builder 6
after generating the makefile with Cmake. Almost immediately I get an error
saying the the symbol 'NAN' is undefined. It appears to be defined in define.h
and the error occurs in type.h. Has anyone else encountered this or have any
ideas as what might be causing it, I'm not sure how it could be undefined.
Thanks.
Hi,
It look as Borland compiler don't define NAN (similarly to MS VisualStudio).
So, if you give me the name of definition which Borland determines itself
(like _MSC_VER for VisualStudio) then I add NAN definition for Borland
compiler too.
Alternatively you can just use
This is formally correct but may produce a lot of warnings by compiler.
Hi,
Thanks for the reply. Your workaround worked. I think that the predefined ID
for Borland is BORLANDC.
I have hit another problem which is the dependence on unistd.h. I believe this
file is not used in windows (although I guess its in MinGW). Is there a
windows equivalent of this or will copying the file from MinGW work? I'm not
familliar enough which what it does to know.
I'm guessing this would be easier if I compiled/downloaded binaries for MingGW
although I guess I won't be able to link against a Borland Builer 6 project.
Thank you. I add BORLANDC everywhere -- with _MS_VER (as for MS
VisualStudio).
Concerning unistd.h. It is header file which contain some system routines
(like chdir() or system()). I've just clean the code (SVN rev.461) for
removing unused inclusion. All other places now use io.h and direct.h only.
Note, that you can use existed win32 binaries as is -- just make .lib from
.dll. But be careful with using MathGL widgets under Borland Builder. Most
probably they will not work due to difference in naming and in event handling.