Antonio :
Me podrías decir cuales son los flags correspondientes para compilar correctamente el programa Winsock.c.
Antonio Linares wrote:Victor,
-DARM -DUNICODE -D__HARBOUR__ -DHB_API_MACROS -D__FLAT__
y primero tienes que llamar a tools\clp2harb.exe para que adapte el fichero C a formato compatible con Harbour.
Antonio Linares wrote:Victor,
Lo tienes en el directorio fwh\tools
TSOCKET.c
clarm.exe -TP -W3 -c -DARM -DUNICODE-D__HARBOUR__-DHB_API_MACROS-D__FLAT__ -IC:\harbourc\include;c:\fwppc\Include -Ic:\FWPPC\INCLUDE -IC:\harbourc\Include -IC:\vce\Include\arm winsock.c
Microsoft (R) C/C++ Optimizing Compiler Version 12.20.9615 for ARM
Copyright (C) Microsoft Corp 1984-2002. All rights reserved.
c:\fwppc\source\winapi\winsock.c(185) : error C2664: '_bset' : cannot convert parameter 1 from 'char *' to 'unsigned char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\fwppc\source\winapi\winsock.c(276) : error C2065: '_send' : undeclared identifier
c:\fwppc\source\winapi\winsock.c(305) : error C2664: '_bset' : cannot convert parameter 1 from 'char *' to 'unsigned char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\fwppc\source\winapi\winsock.c(339) : error C2664: '_bset' : cannot convert parameter 1 from 'char *' to 'unsigned char *'
Types pointed to are unrelated; conversion requires c:\fwppc\source\winapi\winsock.c(386) : error C2664: '_bset' : cannot convert parameter 1 from 'char *' to 'unsigned char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\fwppc\source\winapi\winsock.c(404) : error C2664: '_bset' : cannot convert parameter 1 from 'char *' to 'unsigned char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
#ifdef __HARBOUR__
HARBOUR HB_FUN_BINDTOPORT( PARAMS ) // nSocket, nPort, nAddr1, nAddr2, nAddr3, nAddr4 --> lSuccess
#else
HB_FUN_BINDTOPORT( PARAMS ) // nSocket, nPort, nAddr1, nAddr2, nAddr3, nAddr4 --> lSuccess
#endif
{
SOCKADDR_IN sa; // sockaddr_in sa;
_bset( ( char * ) &sa, 0, sizeof( sa ) );
sa.sin_family = AF_INET;
sa.sin_port = htons( _parni( 2 ) );
/*
sa.sin_addr.s_net = _parni( 3 );
sa.sin_addr.s_host = _parni( 4 );
sa.sin_addr.s_lh = _parni( 5 );
sa.sin_addr.s_impno = _parni( 6 );
*/
sa.sin_addr.s_addr = htonl( INADDR_ANY );
_retl( bind( _parni( 1 ), ( SOCKADDR * ) &sa, sizeof( sa ) ) == 0 );
}
Return to FiveWin para Pocket PC
Users browsing this forum: No registered users and 34 guests