compilar archivos C

compilar archivos C

Postby Patricio Avalos Aguirre » Thu May 24, 2007 4:39 pm

Estimados

Estoy tratando de modificar el menus.c que se encuentra en
c:\fwh\source\winapi, pero al anexarlo al la libreria
fivehC.lib me arroja que no existen varias funciones

Code: Select all  Expand view
Compiling...
c:\borland\bcc55\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
RMAKE 1.5  Copyright (c) 1989-1995 Computer Associates International, Inc.
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_HB_FUN_GETSUBMENU' referenced from C:\FWH\LIB\FIVEH
X.LIB|MDICLIEN
Error: Unresolved external '_HB_FUN_DRAWMENUBAR' referenced from C:\FWH\LIB\FIVE
HX.LIB|MDICLIEN


lo estoy haciendo asi

primero saque el original menus.obj de fivehc.lib y lo respalde en un carpeta diferente

tlib fivehc.lib *menus.c

luego compile menus.c que se encuentra en c:\fwh\source\winapi\menus.c

Code: Select all  Expand view
bcc32.exe -tWM -DHB_GUI -DHB_API_MACROS -DHB_STACK_MACROS -DHB_FM_STATISTICS_OFF -d -a8 -OS -O2 -5 -c MENUS.C

TLIB FIVEHC +- ..\SOURCE\WINAPI\MENUS.OBJ


y si vuelvo anexar el menus.obj del original funciona sin ningun problema


Al parecer le faltan funciones o algo estoy haciendo mal
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Postby Antonio Linares » Thu May 24, 2007 4:47 pm

Patricio,

Comprueba si está la función GetSubMenu() en el fichero menus.c que has modificado
regards, saludos

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

Postby Patricio Avalos Aguirre » Thu May 24, 2007 4:53 pm

Gracias antonio por responder

si existe la funcion GetSubMenu

Code: Select all  Expand view
CLIPPER GETSUBMENU( PARAMS )    // hMenu, nPos
{
   _retnl( ( LONG ) GetSubMenu( ( HMENU ) _parnl( 1 ), _parni( 2 ) ) );
}


a lo mejor son los parametros de la compilacion

lo unico que agregue a este archivo(menus.c)
Code: Select all  Expand view
#ifdef __HARBOUR__
   CLIPPER MENUDRAWITEM( PARAMS ) // ( pDrawItemStruct, cPrompt, lTop, hBitmap )
#else
   CLIPPER MENUDRAWIT( PARAMS ) // EM( pDrawItemStruct, cPrompt, lTop, hBitmap )
#endif
{
   LPDRAWITEMSTRUCT lpdis = ( LPDRAWITEMSTRUCT ) _parnl( 1 );
   LPSTR szPrompt = _parc( 2 );
   BOOL bTab = bStrAt( 9, szPrompt );
   WORD wLen;
   //BOOL bTop = _parl( 3 );
   HPEN hNormal;
   HBRUSH hBrush;
   LOGBRUSH lb;
   RECT rct;
   HBITMAP hBmp = ( HBITMAP ) _parnl( 4 );

   switch( lpdis->itemAction )
   {
      case ODA_DRAWENTIRE:
      case ODA_SELECT:
           lb.lbStyle = BS_SOLID;

           lb.lbColor = GetSysColor( COLOR_MENU );
           hBrush = CreateBrushIndirect( &lb );
           FillRect( lpdis->hDC, &lpdis->rcItem, hBrush );
           DeleteObject( hBrush );

         //PATRICK
         SetBkColor( lpdis->hDC, 8421504 );
         //FIN PATRICK


estoy probando de colocar un color al menu
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Postby Antonio Linares » Thu May 24, 2007 4:57 pm

Patricio,

Compila simplemente asi:

bcc32 -c -Ipath_a_includes menus.c
regards, saludos

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

Postby Patricio Avalos Aguirre » Thu May 24, 2007 5:30 pm

igual el error

estoy viendo la libreria fivehc.lib

tlib fivehc,fivehc.prg

Code: Select all  Expand view
__WNDPRO   size = 149
   _HB_FUN_WININSPECT                __DbgWndProc
   __WndProc                         _bDbgActive
   _bDbgBreak                     

menus      size = 1874
   APPENDMENU                        CHECKMENUI
   CREATEMENU                        CREATEPOPU
   DESTROYMEN                        DRAWMENUBA
   ENABLEMENU                        GETDRAWITE
   GETDRAWMEN                        GETMEAITEM
   GETMENUSTA                        GETMENUSTR
   GETMITEMCO                        GETMITEMID
   GETSUBMENU                        GETSYSTEMM
   HILITEMENU                        INSERTMENU
   ISMENU                            LOADMENU
   MENUDRAWIT                        MENUMEASUR
   MODIFYMENU                        REMOVEMENU
   SETMENU                           TRACKPOPUP



y esta es de la original, hay diferencia??

Code: Select all  Expand view
MENUS      size = 1801
   _HB_FUN_APPENDMENU                _HB_FUN_CHECKMENUITEM
   _HB_FUN_CREATEMENU                _HB_FUN_CREATEPOPUPMENU
   _HB_FUN_DESTROYMENU               _HB_FUN_DRAWMENUBAR
   _HB_FUN_ENABLEMENUITEM            _HB_FUN_GETDRAWITEM
   _HB_FUN_GETDRAWMENU               _HB_FUN_GETMEAITEM
   _HB_FUN_GETMENUSTATE              _HB_FUN_GETMENUSTRING
   _HB_FUN_GETMITEMCOUNT             _HB_FUN_GETMITEMID
   _HB_FUN_GETSUBMENU                _HB_FUN_GETSYSTEMMENU
   _HB_FUN_HILITEMENUITEM            _HB_FUN_INSERTMENU
   _HB_FUN_ISMENU                    _HB_FUN_LOADMENU
   _HB_FUN_MENUDRAWITEM              _HB_FUN_MENUMEASUREITEM
   _HB_FUN_MODIFYMENU                _HB_FUN_REMOVEMENU
   _HB_FUN_SETMENU                   _HB_FUN_TRACKPOPUP


y existe, que raro.. :-(
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Postby Antonio Linares » Thu May 24, 2007 5:35 pm

Patricio,

Faltan los prefijos (_HB_FUN_) de todas las funciones :-)

Tienes que llamar a fwh/tools/clp2harb.exe menus.c menus2.c y luego compilar menus2.c
regards, saludos

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

Postby Patricio Avalos Aguirre » Thu May 24, 2007 8:23 pm

No quiere nada con migo el menus.c :-(


Code: Select all  Expand view
C:\FWH\SOURCE\WINAPI>\fwh\tools\clp2harb menus.c menus2.c

C:\FWH\SOURCE\WINAPI>bcc32 -c -IC:\Borland\BCC55\Include;c:\harbour\include menu
s2.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
menus2.c:
Warning W8070 menus2.c 24: Function should return a value in function HB_FUNC
Warning W8057 menus2.c 24: Parameter 'CREATEMENU' is never used in function HB_F
UNC
Error E2238 menus2.c 33: Multiple declaration for 'HB_FUNC'
Error E2344 menus2.c 21: Earlier declaration of 'HB_FUNC'
Warning W8070 menus2.c 35: Function should return a value in function HB_FUNC
Warning W8057 menus2.c 35: Parameter 'CREATEPOPU' is never used in function HB_F
UNC
Error E2238 menus2.c 40: Multiple declaration for 'HB_FUNC'
Error E2344 menus2.c 31: Earlier declaration of 'HB_FUNC'
Warning W8070 menus2.c 43: Function should return a value in function HB_FUNC
Warning W8057 menus2.c 43: Parameter 'TRACKPOPUP' is never used in function HB_F
UNC
Error E2238 menus2.c 52: Multiple declaration for 'HB_FUNC'
Error E2344 menus2.c 39: Earlier declaration of 'HB_FUNC'
Warning W8070 menus2.c 54: Function should return a value in function HB_FUNC
Warning W8057 menus2.c 54: Parameter 'ENABLEMENU' is never used in function HB_F
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Postby Antonio Linares » Thu May 24, 2007 8:26 pm

Patricio,

Has modificado los includes que lleva menus.c al principio ?
regards, saludos

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

Postby Patricio Avalos Aguirre » Thu May 24, 2007 10:50 pm

Antonio, para nada, es primera vez que le hecho una mirada al la carpeta winapi, siempre he metido mano a las carpeta clases
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Postby Antonio Linares » Fri May 25, 2007 6:28 am

Patricio,

Dinos exactamente que código quieres incluir en menus.c y lo compilamos aqui y te enviamos el OBJ
regards, saludos

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

Postby Patricio Avalos Aguirre » Fri May 25, 2007 2:42 pm

Gracias antonio por tu interes en ayudarme

pero he solucionado el problema

resulta que en c:\fwh\source\winapi\menus.c tiene estos include

Code: Select all  Expand view
#include <WinTen.h>
#include <Windows.h>
#include <ClipApi.h>


lo he solucionado anteponiendo esto
Code: Select all  Expand view
#include "hbapi.h"
#include <WinTen.h>
#include <Windows.h>
#include <ClipApi.h>


a lo mejor era obvio colocarlo este include, pero como sabes estoy iniciandome en esto de C

muchas gracias por la ayuda...

pd. siempre se aprende algo nuevo :-)
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 29 guests