In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Unresolved External HB_FUN_SIN / HB_FUN_COS

Xailer professional forum in English
Responder
Avatar de Usuario
emeasoft
Mensajes: 1094
Registrado: Mié Abr 01, 2009 4:12 pm
Ubicación: emeasoft
Contactar:

Unresolved External HB_FUN_SIN / HB_FUN_COS

Mensaje por emeasoft »

Hello Xailers,
I need to use the functions to calculate sine and cosine of an angle, SIN() and COS().
But it is giving the errors unresolved external 'HB_FUN_SIN' and
unresolved external 'HB_FUN_COS'
Does anyone knows if there is a way to make it work or if exists another function to calculate the sine and cosine?
Thanks,
Juliano
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Unresolved External HB_FUN_SIN / HB_FUN_COS

Mensaje por jfgimenez »

Juliano,
> I need to use the functions to calculate sine and cosine of
> an angle, SIN() and COS().
>
> But it is giving the errors unresolved external 'HB_FUN_SIN'
> and
> unresolved external 'HB_FUN_COS'
>
> Does anyone knows if there is a way to make it work or if
> exists another function to calculate the sine and cosine?
Add this to your code:
//---------------------------------------------------------- --------------------
#pragma BEGINDUMP
#include "Windows.h"
#include "Xailer.h"
#include "math.h"
XA_FUNC( SIN )
{
hb_retnd( sin( hb_parnd( 1 ) ) );
}
XA_FUNC( COS )
{
hb_retnd( cos( hb_parnd( 1 ) ) );
}
#pragma ENDDUMP
//---------------------------------------------------------- --------------------
BTW, according to BCC++ docs, the arguments to both functions must by
expressed in radians.
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Responder