how to compile the file maindllp.c

zazibr
Posts: 71
Joined: Mon Jan 28, 2008 11:18 am
Location: Campo Grande,MS, BRASIL

how to compile the file maindllp.c

Post 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 ***
Daniel Lopes Filho - Campo Grande,MS,Brasil
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6693) + gtwvw + fw 10.2 + vsx e
fw pcc (ainda não usei)
msn : zazibr@hotmail.com
Roberto Parisi
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Re: how to compile the file maindllp.c

Post by Roberto Parisi »

I'm interested too.

Regards,
Roberto Parisi
Romeo
Posts: 328
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)

Re: how to compile the file maindllp.c

Post by Romeo »

Me tooo!

Romeo
Milan
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: how to compile the file maindllp.c

Post 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 ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
zazibr
Posts: 71
Joined: Mon Jan 28, 2008 11:18 am
Location: Campo Grande,MS, BRASIL

Re: how to compile the file maindllp.c

Post 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 ***
Daniel Lopes Filho - Campo Grande,MS,Brasil
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6693) + gtwvw + fw 10.2 + vsx e
fw pcc (ainda não usei)
msn : zazibr@hotmail.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: how to compile the file maindllp.c

Post 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'
regards, saludos

Antonio Linares
www.fivetechsoft.com
zazibr
Posts: 71
Joined: Mon Jan 28, 2008 11:18 am
Location: Campo Grande,MS, BRASIL

Re: how to compile the file maindllp.c

Post 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 : }



 
Daniel Lopes Filho - Campo Grande,MS,Brasil
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6693) + gtwvw + fw 10.2 + vsx e
fw pcc (ainda não usei)
msn : zazibr@hotmail.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: how to compile the file maindllp.c

Post by Antonio Linares »

Daniel,

Please try to change this line this way:

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

Antonio Linares
www.fivetechsoft.com
zazibr
Posts: 71
Joined: Mon Jan 28, 2008 11:18 am
Location: Campo Grande,MS, BRASIL

Re: how to compile the file maindllp.c

Post 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
Daniel Lopes Filho - Campo Grande,MS,Brasil
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6693) + gtwvw + fw 10.2 + vsx e
fw pcc (ainda não usei)
msn : zazibr@hotmail.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: how to compile the file maindllp.c

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

Antonio Linares
www.fivetechsoft.com
Roberto Parisi
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Re: how to compile the file maindllp.c

Post 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
zazibr
Posts: 71
Joined: Mon Jan 28, 2008 11:18 am
Location: Campo Grande,MS, BRASIL

Re: how to compile the file maindllp.c

Post 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
Daniel Lopes Filho - Campo Grande,MS,Brasil
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6693) + gtwvw + fw 10.2 + vsx e
fw pcc (ainda não usei)
msn : zazibr@hotmail.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: how to compile the file maindllp.c

Post by Antonio Linares »

You can download maindllp.c from here:
http://xharbour.cvs.sourceforge.net/vie ... ision=1.34
regards, saludos

Antonio Linares
www.fivetechsoft.com
Roberto Parisi
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

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

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: how to compile the file maindllp.c

Post by Antonio Linares »

Roberto,

I guess the above just applies for Harbour, not xHarbour
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply