I still get this with BCC32:
Warning W8065 contrib\hbhpdf\hpdf_utils.c 219: Call to function 'modff'
with no prototype in function HPDF_FToA
Warning W8065 contrib\hbhpdf\hpdf_utils.c 223: Call to function 'modff'
with no prototype in function HPDF_FToA
Warning W8065 contrib\hbhpdf\hpdf_utils.c 238: Call to function 'modff'
with no prototype in function HPDF_FToA
Did you find a solution? Sorry, I don't remember... :-(
I still get this with BCC32:
Warning W8065 contrib\hbhpdf\hpdf_utils.c 219: Call to function 'modff'
with no prototype in function HPDF_FToA
Warning W8065 contrib\hbhpdf\hpdf_utils.c 223: Call to function 'modff'
with no prototype in function HPDF_FToA
Warning W8065 contrib\hbhpdf\hpdf_utils.c 238: Call to function 'modff'
with no prototype in function HPDF_FToA
Did you find a solution? Sorry, I don't remember... :-(
Enrico,
I am confused. With which BCC version (please gett the info from the
command line)?
I am confused. With which BCC version (please gett the info from the
command line)?
Embarcadero C++ 7.70 for Win32 Copyright (c) 1993-2023 Embarcadero Technologies, Inc.
Any news about this problem? BCC32 7.70 does not have modff in any of
its libraries, as far as I can see. So it can't be used.
Any news about this problem? BCC32 7.70 does not have modff in any of
its libraries, as far as I can see. So it can't be used.
This is working fine:
#include <stdio.h>
#include <math.h>
int main()
{
   float i, f;
   f = ( float ) modf( 123.456, ( double * ) &i );
   printf( "%f %f\n", i, f );
   return 0;
}
Il 26/12/2023 16:45, Enrico Maria Giordano ha scritto:
Any news about this problem? BCC32 7.70 does not have modff in any of
its libraries, as far as I can see. So it can't be used.
This is working fine:
#include <stdio.h>
#include <math.h>
int main()
{
float i, f;
f = ( float ) modf( 123.456, ( double * ) &i );
printf( "%f %f\n", i, f );
return 0;
}
I propose to "fix" contrib\hbhpdf\hpdf_utils.c as above and forget the problem till the next hbhpdf update (I can do it). Please confirm.
Enrico,
Something MUST be wrong with your BCC 7.70 insttallation. modff() is a standard <math.h> function, at least since 7.30.
We need to bettter understtand this issue.
We need to bettter understtand this issue.
This is my test code:
#include <stdio.h>
#include <math.h>
int main()
{
   float i, f;
   f = modff( ( float ) 123.456, &i );
   printf( "%f %f\n", i, f );
   return 0;
}
And these are the results with BCC32 7.30 and BCC32 7.40:
Embarcadero C++ 7.30 for Win32 Copyright (c) 1993-2017 Embarcadero Technologies, Inc.
TEST.C:
Warning W8065 TEST.C 9: Call to function 'modff' with no prototype in function main
Embarcadero C++ 7.40 for Win32 Copyright (c) 1993-2018 Embarcadero Technologies, Inc.
TEST.C:
Warning W8065 TEST.C 9: Call to function 'modff' with no prototype in function main
Please, look what is in math.h:
#if defined(__clang__)
[...]
float      _EXPFUNC modff(float, float *);
[...]
So I presume you are using bcc32c.exe or bcc32x.exe, aren't you? I need
a solution for bcc32.exe. And I still don't understand why not using the "normal" modf() function.
Please, look what is in math.h:
#if defined(__clang__)
[...]
float _EXPFUNC modff(float, float *);
[...]
So I presume you are using bcc32c.exe or bcc32x.exe, aren't you? I need
a solution for bcc32.exe. And I still don't understand why not using the "normal" modf() function.
So I presume you are using bcc32c.exe or bcc32x.exe, aren't you? I need
a solution for bcc32.exe. And I still don't understand why not using the
"normal" modf() function.
Enrico,
The official distributtion of BCC 7.30 (and I assume 7.70) does NOT
have bcc32.exe t only has bcc32c.exe (command line compatible with
legacy bcc32.exe) and bcc32x.exe - BOTH are CLang based C11 conformant meaning they both support modff().
Please make sure tto download tthe OFFCIAL FREE BCC 7.30 from:
https://www.embarcadero.com/free-tools/ccompiler/free-download
It is a ZIP file which should be extracted to \bcc102
FWIW, if you have it then there is no need to settup annything and you
should be able tto just type 'make_bc all' in your xharbour root folder
and you should get core and all contribs tto build without any error.
This is my setup.
Il 26/12/2023 23:20, Ron Pinkas ha scritto:
So I presume you are using bcc32c.exe or bcc32x.exe, aren't you? I need
a solution for bcc32.exe. And I still don't understand why not using the "normal" modf() function.
Enrico,
The official distributtion of BCC 7.30 (and I assume 7.70) does NOT
have bcc32.exe t only has bcc32c.exe (command line compatible with
legacy bcc32.exe) and bcc32x.exe - BOTH are CLang based C11 conformant meaning they both support modff().
This is not true! Maybe Embarcadero could have recently changed the
contents of their free packages but it is in the full commercial
packages. And in any case, this is not enough to simply ignore the
existence of bcc32.exe. You have added support for BCC55 (a very old version!) and want to ignore the latest one?
Please make sure tto download tthe OFFCIAL FREE BCC 7.30 from:
https://www.embarcadero.com/free-tools/ccompiler/free-download
It is a ZIP file which should be extracted to \bcc102
FWIW, if you have it then there is no need to settup annything and you should be able tto just type 'make_bc all' in your xharbour root folder
and you should get core and all contribs tto build without any error.
This is my setup.
The point is not to select a compiler that can build xHarbour but fix xHarbour to be built by a specific compiler.
The point is not to select a compiler that can build xHarbour but fix
xHarbour to be built by a specific compiler.
Of coursse, except I have no clue WHICH compiler that is. You said Free
BCC 7.30, but I have itt insttalled and building fine.
Il 26/12/2023 23:35, Ron Pinkas ha scritto:
The point is not to select a compiler that can build xHarbour but fix xHarbour to be built by a specific compiler.
Of coursse, except I have no clue WHICH compiler that is. You said Free
BCC 7.30, but I have itt insttalled and building fine.
Any BCC version. I repeat: bcc32.exe (ie. not CLANG) is provided with
the commercial version.
Any BCC version. I repeat: bcc32.exe (ie. not CLANG) is provided with
the commercial version.
Enrico, my official insttallation did NOT include bcc32.exe only
bcc32c.exe and bcc32x.exe
please run your bcc32.exe and tell me which VERSION it is.
Also please provide tthe content of bcc32.cfg.
Since we don't have auto detection for bcc32.exe beyong version 5.8
(please see find_bc.batt) then it means that you must specify
INCLUDE and LIB folders manually - please provide that info too.
Il 26/12/2023 23:51, Ron Pinkas ha scritto:
Any BCC version. I repeat: bcc32.exe (ie. not CLANG) is provided with
the commercial version.
Enrico, my official insttallation did NOT include bcc32.exe only
bcc32c.exe and bcc32x.exe
Yes, but that is the free version. The commercial version includes also bcc32.exe (not CLANG).
please run your bcc32.exe and tell me which VERSION it is.
BCC 7.70 32 bit (not CLANG)
Embarcadero C++ 7.70 for Win32 Copyright (c) 1993-2023 Embarcadero Technologies, Inc.
Also please provide tthe content of bcc32.cfg.
-I@\..\include\windows\crtl;@\..\include\windows\sdk;@\..\include\dinkumware -O
-O1
-OS
-Ob
-Oc
-Ov
-c
-d
-g0
-k-
-v-
-w
-w!
-w-inl
Since we don't have auto detection for bcc32.exe beyong version 5.8
(please see find_bc.batt) then it means that you must specify
INCLUDE and LIB folders manually - please provide that info too.
Yes, I always specify them, even with the old build system.
Thanks Enrico, how are the LIBs resolved - I do not see any -L in the
.cfg.
Ok, now that its clear that the bcc32.exe is part of the same
disttribution that include the conformant bcc32c.exe I am sorry butt I
do not see any reason to support the legacy bcc32.exe. The ONLY way to
get that legacy compiler is along side bcc32c.exe which we [auto]
support.
FWIW Embarcadero itself aparantly gave up on that compiler or it would
have been updated.
At least I can adopt a local solution: a little program that "fix" the
code on the fly replacing modff() with modf(), to be run before BCC32
build starts.
I found a better solution: I fixed BCC32 math.h adding this at the end:
#if !defined( __clang__ )
#define modff( f, i ) ( float ) modf( f, ( double * ) i )
#endif
Now BCC32 (not CLANG) can use modff() without problems.
Il 27/12/2023 01:27, Ron Pinkas ha scritto:
Thanks Enrico, how are the LIBs resolved - I do not see any -L in the
.cfg.
SET LFLAGS=-L%BCC%\lib;%BCC%\lib\psdk
Ok, now that its clear that the bcc32.exe is part of the same
disttribution that include the conformant bcc32c.exe I am sorry butt I
do not see any reason to support the legacy bcc32.exe. The ONLY way to
get that legacy compiler is along side bcc32c.exe which we [auto]
support.
FWIW Embarcadero itself aparantly gave up on that compiler or it would
have been updated.
No, they are not. Otherwise my bcc32.exe 7.70 of 2023 would not exist.
No, they are not. Otherwise my bcc32.exe 7.70 of 2023 would not exist.
If they did not, and its missing support for modff() of C99, maybe its
just a bug that you should report to them. Do they list anywhere the standards supported by tthe compiler?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 428 |
Nodes: | 16 (2 / 14) |
Uptime: | 109:15:04 |
Calls: | 9,053 |
Files: | 13,395 |
Messages: | 6,015,914 |