Que Lib devo usar?

Que Lib devo usar?

Postby Coiote » Tue Dec 15, 2009 5:59 am

Olá colegas

O Harbour dispõe das funções

LoadLibrary()
dllcall()

Em qual lib elas estão?

Sei que em versões mais novas elas estão na Hbwin.lib
Porém eu uso o Harbour 1.0 para testar o Fivewin 6.12
Coiote
 
Posts: 19
Joined: Tue Oct 06, 2009 7:26 pm

Re: Que Lib devo usar?

Postby Antonio Linares » Tue Dec 15, 2009 10:16 am

Ricardo,

FWH proporciona LoadLibrary() y FreeLibrary() y tambien puedes llmar a DLLs dinámicamente usando:

DLL FUNCTION ... sintaxis. Hay bastantes ejemplos en FWH\source\*\*.prg

Revisa por favor FWH\include\DLL.ch
regards, saludos

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

Re: Que Lib devo usar?

Postby Coiote » Wed Dec 16, 2009 1:11 pm

Ótimo, Antonio!
Incluindo o arquivo Dll.ch e as libs fivehc e fivehx os erros agora são só 3:

CUPOM4.prg(6) Warning W0001 Ambiguous reference: 'HBOR'
CUPOM4.prg(13) Warning W0001 Ambiguous reference: 'HBOR'
Generating C source output to 'CUPOM4.c'... Done.
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
b32.bc gerado com sucesso

Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_HB_FUN_BWCCREGISTER' referenced from C:\SCE\DARUMA\CUPOM4.OBJ
* There are errors

O programa é este:
#include "\Harbour\FWH\Include\FiveWin.ch"
#include "\Harbour\FWH\Include\Dll.ch"

Procedure Main()
public Int_Retorno
hBor := LoadLibrary( "bwcc32.dll" )
BWCCRegister( GetResources( ) )
SetHandleCount( 200 )

m->Int_Retorno := Daruma_FI_LeituraX()
hb_Analisa_Retorno()

FreeLibrary( hBor ) // Release borland

Return
Coiote
 
Posts: 19
Joined: Tue Oct 06, 2009 7:26 pm

Re: Que Lib devo usar?

Postby Antonio Linares » Wed Dec 16, 2009 1:35 pm

Tienes que añadir esta línea al final de tu PRG:
Code: Select all  Expand view

DLL32 FUNCTION BWCCRegister( hInst AS LONG ) AS WORD PASCAL LIB "BWCC32.DLL"
 
regards, saludos

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

Re: Que Lib devo usar?

Postby Coiote » Thu Jan 14, 2010 8:29 pm

Antônio, você é o máximo!

E para estes outros unresolved external?
_HB_FUN_LOADLIBRARY
_HB_FUN_GETRESOURCES
_HB_FUN_STEHANDLECOUNT
_HB_FUN_FREELIBRARY
_HB_FUN_TSAY
_HB_FUN_GETPROCADRESS
_HB_FUN_CALLDLL
_HB_FUN_MSGALERT
Coiote
 
Posts: 19
Joined: Tue Oct 06, 2009 7:26 pm

Re: Que Lib devo usar?

Postby Coiote » Fri Jan 15, 2010 3:12 am

Já descobri que estes "unresolved external" são causados por chamadas de funções dentro dos arquivos Fivewin.ch e Dll.ch.

Imagino que falta incluir alguma lib para que estas funções sejam reconhecidas
pelo Borland Turbo Incremental Link 5.0

Se for isso mesmo que LIB é esta?

Já tentei com o Harbour 1.0 e 2.0 usando Build.bat e Fivewin 6.12
Coiote
 
Posts: 19
Joined: Tue Oct 06, 2009 7:26 pm

Re: Que Lib devo usar?

Postby Antonio Linares » Fri Jan 15, 2010 10:40 am

Con FWH 6.12 tienes que usar este Harbour:

http://www.fivetechsoft.com/files/6.12/harbour.exe
regards, saludos

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

Re: Que Lib devo usar?

Postby Coiote » Tue Jan 19, 2010 12:35 am

Estou usando o Harbour que você indicou mas o erro continua.

Ficou melhor usando esta sequência de links:

Rochinha,

Obrigado pela dica. Melhorou pois aqueles unresolved external não aparecem mais. Agora aparecem estes:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
'_hb_vmProcessSymbolsEx' referenced from C:\HARBOUR\FWH\LIB\FIVEH.LIB|ERRSYSW
'_HB_FUN_HB_DBG_VMSTKLCOUNT' referenced from C:\HARBOUR\FWH\LIB\FIVEH.LIB|HARBOUR
'_HB_FUN_HB_DBG_VMPARLLIST' referenced from C:\HARBOUR\FWH\LIB\FIVEH.LIB|HARBOUR
'_HB_FUN_HB_DBG_VMVARLGET' referenced from C:\HARBOUR\FWH\LIB\FIVEH.LIB|HARBOUR
'_HB_FUN_HB_DBG_VMVARSLEN' referenced from C:\HARBOUR\FWH\LIB\FIVEH.LIB|HARBOUR

Eis o build.bat que estou usando:
If Not Exist "uuid.lib" COPY %bcdir%\LIB\UUID.LIB /Y
echo %bcdir%\lib\c0w32.obj + > b32.bc
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo \harbour\fwh\lib\FiveH.lib + >> b32.bc
echo \harbour\fwh\lib\FiveHC.lib + >> b32.bc
REM echo %hdir%\lib\ct.lib + >> b32.bc Não tenho esta lib
echo %hdir%\lib\uuid.lib + >> b32.bc
echo %hdir%\lib\hbdebug.lib + >> b32.bc
echo %hdir%\lib\hbrtl.lib + >> b32.bc
echo %hdir%\lib\hbvm.lib + >> b32.bc
echo %hdir%\lib\gtwin.lib + >> b32.bc
echo %hdir%\lib\hblang.lib + >> b32.bc
echo %hdir%\lib\hbmacro.lib + >> b32.bc
echo %hdir%\lib\hbrdd.lib + >> b32.bc
echo %hdir%\lib\rddcdx.lib + >> b32.bc
echo %hdir%\lib\rddntx.lib + >> b32.bc
echo %hdir%\lib\rddfpt.lib + >> b32.bc
echo %hdir%\lib\hbgt.lib + >> b32.bc
echo %hdir%\lib\hbcommon.lib + >> b32.bc
REM echo %hdir%\lib\libmisc.lib + >> b32.bc Não tenho esta lib
echo %hdir%\lib\hbpp.lib + >> b32.bc
echo %hdir%\lib\hbcpage.lib + >> b32.bc
echo %hdir%\lib\hbsix.lib + >> b32.bc
echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\import32.lib, >> b32.bc

ECHO Linking...
%bcdir%\bin\ilink32 -Gn -Tpe -s @b32.bc

Acho que está perto.
Coiote
 
Posts: 19
Joined: Tue Oct 06, 2009 7:26 pm

Re: Que Lib devo usar?

Postby Antonio Linares » Tue Jan 19, 2010 9:47 am

regards, saludos

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

Re: Que Lib devo usar?

Postby Coiote » Tue Jan 19, 2010 12:56 pm

Compilou!!!

Obrigado (Gracias) Antônio!
Coiote
 
Posts: 19
Joined: Tue Oct 06, 2009 7:26 pm


Return to All products support

Who is online

Users browsing this forum: No registered users and 4 guests