FWH mingw y fivedit.prg

FWH mingw y fivedit.prg

Postby nnicanor » Sat Mar 10, 2012 6:15 am

Cuando trato de compilar fivedit.prg con harbour 3.1 y mingw aparecen estas funciones no definidas

Harbour 3.1.0dev (Rev. 17003)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling 'fivedit.prg' and generating preprocessed output to 'fivedit.ppo'...
Lines 4084, Functions/Procedures 8
Generating C source output to 'fivedit.c'... Done.
fivedit.o:fivedit.c:(.data+0x308): undefined reference to `HB_FUN_MAPISENDDOCUMENTS'
.\..\lib/fivehgc.lib(NET.o):NET.C:(.text+0x8e): undefined reference to `WNetAddConnectionA@12'
.\..\lib/fivehgc.lib(NET.o):NET.C:(.text+0x1a2): undefined reference to `WNetAddConnection2A@16'
.\..\lib/fivehgc.lib(NET.o):NET.C:(.text+0x1ea): undefined reference to `WNetGetUserA@12'
.\..\lib/fivehgc.lib(NET.o):NET.C:(.text+0x26d): undefined reference to `WNetConnectionDialog@8'
.\..\lib/fivehgc.lib(NET.o):NET.C:(.text+0x295): undefined reference to `WNetDisconnectDialog@8'
.\..\lib/fivehgc.lib(NET.o):NET.C:(.text+0x2e1): undefined reference to `WNetGetConnectionA@12'
.\..\lib/fivehgc.lib(NET.o):NET.C:(.text+0x35c): undefined reference to `WNetCancelConnectionA@8'
collect2: ld returned 1 exit status
* Link errors *

La solucion que encontre para las funciones WNet ... es agregar las librerias mapi32.a y mpr.a

La funcion HB_FUN_MAPISENDDOCUMENTS al parecer no esta incluido el modulo mapi.c en las librerias de FWH para mingw lo recompile y lo agregue y compilo perfecto me queda este error por resolver
Application
===========
Path and name: c:\FWH1105\samples\fivedit.exe (32 bits)
Size: 2,487,296 bytes
Time from start: 0 hours 0 mins 24 secs
Error occurred at: 03/10/12, 00:59:05
Error description: Error BASE/1003 Variable does not exist: OEDIT

Stack Calls
===========
Called from: .\source\classes\TTxtEdit.PRG => TTXTEDIT:MOUSEMOVE(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\CONTROL.PRG => TTXTEDIT:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: fivedit.prg => MAIN(94)


Slds
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 302
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: FWH mingw y fivedit.prg

Postby Antonio Linares » Sat Mar 10, 2012 9:27 am

Nicanor,

Que versión de FWH estás usando ?
regards, saludos

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

Re: FWH mingw y fivedit.prg

Postby nnicanor » Sat Mar 10, 2012 11:59 pm

Antonio 11.05


Slds
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 302
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: FWH mingw y fivedit.prg

Postby nnicanor » Sun Mar 11, 2012 12:09 am

Para poder compilar tuve que compilar y agregar los modulos calldll.c y olefuncs.prg con los cambios sugeridos y agregar Patchg.lib sugerido por Daniel para Harbour 3.1 con eso las pruebas han ido de maravilla y ya pudimos compilar la primera aplicacion completa con mingw.

No funcionaba la función shellexceute y la cambiamos por la siguiente que encontramos en otro foro de harbour:

Code: Select all  Expand view


#pragma BEGINDUMP

 #include <hbapi.h>
 #include <windows.h>

HB_FUNC( SHELLEXECUTES )
{
   hb_retnl( (LONG) ShellExecute( (HWND) hb_parnl(1),HB_ISNIL(2) ? NULL : (LPCSTR) hb_parc(2),(LPCSTR) hb_parc(3),HB_ISNIL(4) ? NULL : (LPCSTR) hb_parc(4),HB_ISNIL(5) ? NULL : (LPCSTR) hb_parc(5),hb_parni(6) ) ) ;
}

HB_FUNC( WINVERSION )
{

   OSVERSIONINFOEX osvi;
   BOOL            bOsVersionInfoEx;
   CHAR            *szVersion = NULL;
   CHAR            *szServicePack = NULL;
   CHAR            *szBuild = NULL;
   CHAR            buffer[5];

   CHAR            *szVersionEx = NULL;


   ZeroMemory(&osvi,sizeof(OSVERSIONINFOEX));
   osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);

   bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO*)&osvi);
   if ( !bOsVersionInfoEx )
   {
      osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
      if ( !GetVersionEx((OSVERSIONINFO*)&osvi))
         szVersion = "Unknown Operating System";
   }

   if (szVersion == NULL)
   {
      switch (osvi.dwPlatformId)
      {
         case VER_PLATFORM_WIN32_NT:
            if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2)
               szVersion = "Windows Server 2003 family ";

            if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1)
               szVersion = "Windows XP ";

            if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0)
               szVersion = "Windows Vista ";

            if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1)
               szVersion = "Windows 7 ";

            if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0)
               szVersion = "Windows 2000 ";

            if (osvi.dwMajorVersion <= 4)
               szVersion = "Windows NT ";

            if (bOsVersionInfoEx)
            {
               if (osvi.wProductType == VER_NT_WORKSTATION)
               {
                  if (osvi.dwMajorVersion == 4)
                     szVersionEx = "Workstation 4.0 " ;
                  else if (osvi.wSuiteMask & VER_SUITE_PERSONAL)
                     szVersionEx = "Home Edition " ;
                  else
                     szVersionEx = "Professional ";
               }
               else if (osvi.wProductType == VER_NT_SERVER)
               {

                  if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2)
                  {

                     if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
            {
                        szVersionEx = "Datacenter Edition " ;
            }
                     else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
            {
                        szVersionEx = "Enterprise Edition " ;
            }
                     else if (osvi.wSuiteMask & VER_SUITE_BLADE)
            {
                        szVersionEx = "Web Edition " ;
            }
                     else
            {
                        szVersionEx = "Standard Edition " ;
            }

                  }

                  else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0)
                  {
                     if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
                        szVersionEx = "Datacenter Server " ;
                     else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
                        szVersionEx = "Advanced Server " ;
                     else
                        szVersionEx = "Server ";
                  }
                  else
                  {
                     if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
                        szVersionEx = "Server 4.0, Enterprise Edition " ;
                     else
                        szVersionEx = "Server 4.0 " ;
                  }
               }
            }
            else
            {
               HKEY hKey;
               char szProductType[80];
               DWORD dwBufLen = 80;
               LONG lRetVal;

               lRetVal = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
                                      "SYSTEM\\CurrentControlSet\\Control\\ProductOptions",0,
                                      KEY_QUERY_VALUE,&hKey);

               if (lRetVal != ERROR_SUCCESS)
                  szVersion = "Unknown Operating System";
               else
               {
                  lRetVal = RegQueryValueEx(hKey,"ProductType",NULL,NULL,(LPBYTE)szProductType,&dwBufLen);
                  if ((lRetVal != ERROR_SUCCESS) || (dwBufLen > 80))
                     szVersion = "Unknown Operating System";
               }
               RegCloseKey(hKey);

               if (szVersion != "Unknown Operating System")
               {
                  if (lstrcmpi("WINNT",szProductType) == 0)
                     szVersionEx = "Workstation " ;
                  if (lstrcmpi("LANMANNT",szProductType) == 0)
                     szVersionEx = "Server " ;
                  if (lstrcmpi("SERVERNT",szProductType) == 0)
                     szVersionEx = "Advanced Server " ;

                  szVersion = strcat(szVersion,itoa(osvi.dwMajorVersion,buffer,10));
                  szVersion = strcat(szVersion,".");
                  szVersion = strcat(szVersion,itoa(osvi.dwMinorVersion,buffer,10));
               }
            }
            if (osvi.dwMajorVersion == 4 && lstrcmpi(osvi.szCSDVersion,"Service Pack 6") == 0)
            {
               HKEY hKey;
               LONG lRetVal;

               lRetVal = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
                                      "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Hotfix\\Q246009",
                                      0,KEY_QUERY_VALUE,&hKey);
               if (lRetVal == ERROR_SUCCESS)
               {
                  szServicePack = "Service Pack 6a";
                  szBuild = itoa(osvi.dwBuildNumber & 0xFFFF,buffer,10) ;
               }
               else
               {
                  szServicePack = osvi.szCSDVersion;
                  szBuild = itoa(osvi.dwBuildNumber & 0xFFFF,buffer,10) ;
               }
               RegCloseKey(hKey);
            }
            else
            {
               szServicePack = osvi.szCSDVersion;
               szBuild = itoa(osvi.dwBuildNumber & 0xFFFF,buffer,10) ;
            }
            break;

         case VER_PLATFORM_WIN32_WINDOWS:
            if ((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion == 0))
            {
               if (osvi.szCSDVersion[1] == 'B')
               {
                  szVersion = "Windows 95 B";
                  szServicePack = "OSR2";
               }
               else
               {
                  if (osvi.szCSDVersion[1] == 'C')
                  {
                     szVersion = "Windows 95 C";
                     szServicePack = "OSR2";
                  }
                  else
                  {
                     szVersion = "Windows 95";
                     szServicePack = "OSR1";
                  }
               }
               szBuild = itoa(osvi.dwBuildNumber & 0x0000FFFF,buffer,10) ;
            }
            if ((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion == 10))
            {
               if (osvi.szCSDVersion[1] == 'A')
               {
                  szVersion = "Windows 98 A";
                  szServicePack = "Second Edition";
               }
               else
               {
                  szVersion = "Windows 98";
                  szServicePack = "First Edition";
               }

               szBuild = itoa(osvi.dwBuildNumber & 0x0000FFFF,buffer,10) ;
            }
            if ((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion == 90))
            {
               szVersion = "Windows ME";
               szBuild = itoa(osvi.dwBuildNumber & 0x0000FFFF,buffer,10) ;
            }
            break;
      }

   }

   hb_reta( 4 );
   hb_storvc( szVersion , -1, 1 );
   hb_storvc( szServicePack, -1, 2 );
   hb_storvc( szBuild, -1, 3 );
   hb_storvc( szVersionEx, -1, 4 );


}

#pragma ENDDUMP

 


Slds
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 302
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: FWH mingw y fivedit.prg

Postby nnicanor » Sun Mar 11, 2012 4:45 pm

Antonio,

Usamos FWH 1105 se que es una version desactualizada pero hemos podido hacer pruebas sobre todo para mingw, he compilado fivedit también con xharbour y harbour para borland, xharbour y harbour para mvc pero no encuentro como puedo resolver el error de variable inexistente oedit.

Application
===========
Path and name: c:\FWH1105\samples\fivedit.exe (32 bits)
Size: 2,487,296 bytes
Time from start: 0 hours 0 mins 24 secs
Error occurred at: 03/10/12, 00:59:05
Error description: Error BASE/1003 Variable does not exist: OEDIT
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 302
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 53 guests