Compilando Winsock.c

Compilando Winsock.c

Postby Vikthor » Mon Oct 23, 2006 8:47 pm

Antonio :

Me podrías decir cuales son los flags correspondientes para compilar correctamente el programa Winsock.c.
Vikthor
User avatar
Vikthor
 
Posts: 271
Joined: Fri Oct 07, 2005 5:20 am
Location: México

Postby Antonio Linares » Mon Oct 23, 2006 9:17 pm

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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Vikthor » Mon Oct 23, 2006 10:21 pm

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 :
Gracias por la respuesta
Y aprovechando que es gerundio, de dónde puedo bajar clp2harb.exe
Vikthor
User avatar
Vikthor
 
Posts: 271
Joined: Fri Oct 07, 2005 5:20 am
Location: México

Postby Antonio Linares » Mon Oct 23, 2006 11:36 pm

Victor,

Lo tienes en el directorio fwh\tools
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Vikthor » Tue Oct 24, 2006 3:25 pm

Antonio Linares wrote:Victor,

Lo tienes en el directorio fwh\tools


Antonio :

Agregue los flag que me comentaste y al momento de compilar me devuelve estos errores.
Code: Select all  Expand view

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


Y este el cógio fuente del primer error
Code: Select all  Expand view
#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 );
}
Vikthor
User avatar
Vikthor
 
Posts: 271
Joined: Fri Oct 07, 2005 5:20 am
Location: México


Return to FiveWin para Pocket PC

Who is online

Users browsing this forum: No registered users and 26 guests