Page 1 of 2

how to compile the file maindllp.c

Posted: Mon Mar 15, 2010 6:08 pm
by zazibr
c:\xharbour\bcc55\bin\bcc32 -M -c -O2 -tWD -D__HARBOUR__ -w-nak -D__EXPORT__ -n%hdir%\lib -I%hdir%\include %hdir%\source\vm\maindllp.c


Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
c:\xharbour\source\vm\maindllp.c:
Error E2356 c:\xharbour\source\vm\maindllp.c 189: Type mismatch in redeclaration
of 'hb_parc'
Error E2344 c:\xharbour\include\hbapi.h 399: Earlier declaration of 'hb_parc'
Error E2356 c:\xharbour\source\vm\maindllp.c 628: Type mismatch in redeclaration
of 'hb_pards'
Error E2344 c:\xharbour\include\hbapi.h 403: Earlier declaration of 'hb_pards'
Error E2356 c:\xharbour\source\vm\maindllp.c 1518: Type mismatch in redeclaratio
n of 'hb_snprintf'
Error E2344 c:\xharbour\include\hbapi.h 681: Earlier declaration of 'hb_snprintf
'
*** 6 errors in Compile ***

Re: how to compile the file maindllp.c

Posted: Wed Mar 17, 2010 4:01 pm
by Roberto Parisi
I'm interested too.

Regards,
Roberto Parisi

Re: how to compile the file maindllp.c

Posted: Wed Mar 17, 2010 4:38 pm
by Romeo
Me tooo!

Romeo
Milan

Re: how to compile the file maindllp.c

Posted: Thu Mar 18, 2010 11:25 am
by Antonio Linares
Daniel,

It seems as -I%hdir%\include is not pointing to c:\xharbour\include.

Could it be that you are using Harbour header files instead of xharbour's ones ?

Re: how to compile the file maindllp.c

Posted: Thu Mar 18, 2010 4:30 pm
by zazibr
I just xHarbour installed, if you want I can send via ftp a copy of my xHarbour

c:\xharbour\bcc55\bin\bcc32 -M -c -O2 -tWD -D__HARBOUR__ -w-nak -D__EXPORT__ -nc:\xharbour\lib -Ic:\xharbour\include c:\xharbour\source\vm\maindllp.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
c:\xharbour\source\vm\maindllp.c:
Error E2356 c:\xharbour\source\vm\maindllp.c 189: Type mismatch in redeclaration
of 'hb_parc'
Error E2344 c:\xharbour\include\hbapi.h 399: Earlier declaration of 'hb_parc'
Error E2356 c:\xharbour\source\vm\maindllp.c 628: Type mismatch in redeclaration
of 'hb_pards'
Error E2344 c:\xharbour\include\hbapi.h 403: Earlier declaration of 'hb_pards'
Error E2356 c:\xharbour\source\vm\maindllp.c 1518: Type mismatch in redeclaratio
n of 'hb_snprintf'
Error E2344 c:\xharbour\include\hbapi.h 681: Earlier declaration of 'hb_snprintf
'
*** 6 errors in Compile ***

Re: how to compile the file maindllp.c

Posted: Thu Mar 18, 2010 9:57 pm
by Antonio Linares
Daniel,

Please copy this source code line here, thanks:

Error E2356 c:\xharbour\source\vm\maindllp.c 189: Type mismatch in redeclaration
of 'hb_parc'

Re: how to compile the file maindllp.c

Posted: Thu Mar 18, 2010 10:12 pm
by zazibr

Code: Select all

line 187 : 
line 188 : char * hb_parc( int iParam, ... )
line 189 : {
line 190 :    static FARPROC pParC = NULL;
line 191 : 
line 192 :    if ( !pParC )
line 193 :    {
line 194 :       pParC = hb_GetProcAddress( "_hb_parc" );
line 195 :    }
line 196 : 
line 197 :    if( pExtIsArray && pParC )
line 198 :    {
line 199 :       if( ( ( EXT_IS_ARRAY ) pExtIsArray )( iParam ) )
line 200 :       {
line 201 :          va_list va;
line 202 :          ULONG ulArrayIndex;
line 203 : 
line 204 :          va_start( va, iParam );
line 205 :          ulArrayIndex = va_arg( va, ULONG );
line 206 :          va_end( va );
line 207 : 
line 208 :          return ( ( EXT_PARC2 ) pParC )( iParam, ulArrayIndex );
line 209 :       }
line 210 :       else
line 211 :       {
line 212 :          return ( ( EXT_PARC1 ) pParC )( iParam );
line 213 :       }
line 214 :    }
line 215 :    else
line 216 :    {
line 217 :       return "";
line 218 :    }
line 219 : }



 

Re: how to compile the file maindllp.c

Posted: Thu Mar 18, 2010 10:18 pm
by Antonio Linares
Daniel,

Please try to change this line this way:

line 188 : static char * hb_parc( int iParam, ... )

Re: how to compile the file maindllp.c

Posted: Thu Mar 18, 2010 11:31 pm
by zazibr
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
c:\xharbour\source\vm\maindllp.c:
Error E2356 c:\xharbour\source\vm\maindllp.c 190: Type mismatch in redeclaration
of 'hb_parc'
Error E2344 c:\xharbour\include\hbapi.h 399: Earlier declaration of 'hb_parc'
Error E2356 c:\xharbour\source\vm\maindllp.c 629: Type mismatch in redeclaration
of 'hb_pards'
Error E2344 c:\xharbour\include\hbapi.h 403: Earlier declaration of 'hb_pards'
Error E2356 c:\xharbour\source\vm\maindllp.c 1519: Type mismatch in redeclaratio
n of 'hb_snprintf'
Error E2344 c:\xharbour\include\hbapi.h 681: Earlier declaration of 'hb_snprintf

Re: how to compile the file maindllp.c

Posted: Fri Mar 19, 2010 7:57 am
by Antonio Linares
Daniel,

maindllp.c properly compiled here on first try:

Code: Select all

C:\temp>c:\bcc55\bin\bcc32 -c -Ic:\xharbour\include maindllp.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
maindllp.c:

C:\temp>
 
Here you have the resulting maindllp.obj:
http://www.mediafire.com/?zmneuvzmi4i

Re: how to compile the file maindllp.c

Posted: Fri Mar 19, 2010 8:45 am
by Roberto Parisi
Hi Antonio,
are you using last xharbour CVS? The problem still exists.

i:\apps\bcc55\bin\bcc32 -c -Ii:\apps\xharbour\include -Ii:\apps\bcc55\include maindllp.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
maindllp.c:
Error E2356 maindllp.c 189: Type mismatch in redeclaration of 'hb_parc'
Error E2344 i:\apps\xharbour\include\hbapi.h 399: Earlier declaration of 'hb_parc'
Error E2356 maindllp.c 628: Type mismatch in redeclaration of 'hb_pards'
Error E2344 i:\apps\xharbour\include\hbapi.h 403: Earlier declaration of 'hb_pards'
Error E2356 maindllp.c 1518: Type mismatch in redeclaration of 'hb_snprintf'
Error E2344 i:\apps\xharbour\include\hbapi.h 681: Earlier declaration of 'hb_snprintf'
*** 6 errors in Compile ***

Regards,
Roberto Parisi

Re: how to compile the file maindllp.c

Posted: Fri Mar 19, 2010 12:32 pm
by zazibr
meu xharbour esta no link poderia verificar ou poderia me enviar uma copia dos fontes do seu xharbour ?

my xharbour this could check the link or could send me a copy of the sources of their xharbour included the contrib directory?

http://www.lopes.ms/fw/xharbour.rar

Re: how to compile the file maindllp.c

Posted: Sat Mar 20, 2010 8:20 am
by Antonio Linares
You can download maindllp.c from here:
http://xharbour.cvs.sourceforge.net/vie ... ision=1.34

Re: how to compile the file maindllp.c [SOLVED]

Posted: Sat Mar 20, 2010 10:23 am
by Roberto Parisi
I changed the following lines (according to hbapi.h declaration):

188:
char * hb_parc( int iParam, ... )
to
const char * hb_parc( int iParam, ... )

627:
char * hb_pards( int iParam, ... ) /* retrieve a date as a string yyyymmdd */
to
const char * hb_pards( int iParam, ... ) /* retrieve a date as a string yyyymmdd */

1518:
ULONG hb_snprintf( char * buffer, ULONG nSize, const char * format, ... )
to
int hb_snprintf( char * buffer, size_t nSize, const char * format, ... )

Regards,
Roberto Parisi

Re: how to compile the file maindllp.c

Posted: Sat Mar 20, 2010 2:51 pm
by Antonio Linares
Roberto,

I guess the above just applies for Harbour, not xHarbour