Compilation problem with version 3.0.45

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Compilation problem with version 3.0.45

Post by esgici »

esgici wrote:
chrisjx2002 wrote:It lacks the lib hbvpdf.. Where can I find this library?
<hmg>\HARBOUR\lib\win\mingw\libhbvpdf.a
chrisjx2002 wrote:I think it would be a good idea to include the libhbvpdf in the next hmg release. Then it would be possible to compile the samples report.advanced.
Hi Chris

Sorry, wrong info; really not found such file c:\hmg.3.0.45\HARBOUR\lib\win\mingw\libhbvpdf.a :(

(Realized after clean re-install HMG 3.0.45)

So I agreed with your wish :arrow:

Regards
Viva INTERNATIONAL HMG :D
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Compilation problem with version 3.0.45

Post by Rathinagiri »

Yes. It will be.

I think it is right time to make a new version or a patch version. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
chrisjx2002
Posts: 192
Joined: Wed Jan 06, 2010 5:39 pm

Re: Compilation problem with version 3.0.45

Post by chrisjx2002 »

Very good idea :)
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Compilation problem with version 3.0.45

Post by Rathinagiri »

Carlos Reis wrote:
Hi rathinagiri
thanks for the reply
So I have many dozens of prg's to modify :(
Then I wonder to know your solution to not modify so many prg's
Hi,

Actually I use HMGMySQL Bridge distributed with HMG. You can see the HMGSQL folder for details.

I show the respective lines here for you.

Code: Select all

function sql(dbo1,qstr)
local table := nil
local currow := nil
local tablearr := {}
local rowarr := {}
local curdateformat := set(_SET_DATEFORMAT)
local i := 0
local j := 0
local aTinyIntFields := {}
set date ansi
table := dbo1:query(qstr)
if table:neterr()
   msgstop(table:error())
   table:destroy()
   set(_SET_DATEFORMAT,curdateformat)
   return tablearr
else
   if table:lastrec() > 0
      asize( aTinyIntFields, 0 )
      firstrow := table:getrow( 1 )
      for j := 1 to len( table:aFieldStruct )
         if table:aFieldStruct[ j, 4 ] == 1 // tiny integer
            aadd( aTinyIntFields, j )
         endif
      next j
      asize(tablearr,0)
      for i := 1 to table:lastrec()
         asize(rowarr,0)     
         currow := table:getrow(i)
         for j := 1 to table:fcount()         
            aadd(rowarr,currow:fieldget(j))
         next j
         for j := 1 to len( aTinyIntFields )
            if rowarr[ aTinyIntFields[ j ] ] > 0
               rowarr[ aTinyIntFields[ j ] ] := .t.
            else
               rowarr[ aTinyIntFields[ j ] ] := .f.
            endif
         next j
         aadd(tablearr,aclone(rowarr))
      next i
   endif
   table:destroy()
   set(_SET_DATEFORMAT,curdateformat)
   return tablearr
endif
return tablearr
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Carlos Reis
Posts: 16
Joined: Sat Oct 09, 2010 3:31 pm
Location: Portugal

Re: Compilation problem with version 3.0.45

Post by Carlos Reis »

rathinagiri wrote:
Carlos Reis wrote:
Hi rathinagiri
thanks for the reply
So I have many dozens of prg's to modify :(
Then I wonder to know your solution to not modify so many prg's
Hi,

Actually I use HMGMySQL Bridge distributed with HMG. You can see the HMGSQL folder for details.

I show the respective lines here for you.

Code: Select all

function sql(dbo1,qstr)
local table := nil
local currow := nil
local tablearr := {}
local rowarr := {}
local curdateformat := set(_SET_DATEFORMAT)
local i := 0
local j := 0
local aTinyIntFields := {}
set date ansi
table := dbo1:query(qstr)
if table:neterr()
   msgstop(table:error())
   table:destroy()
   set(_SET_DATEFORMAT,curdateformat)
   return tablearr
else
   if table:lastrec() > 0
      asize( aTinyIntFields, 0 )
      firstrow := table:getrow( 1 )
      for j := 1 to len( table:aFieldStruct )
         if table:aFieldStruct[ j, 4 ] == 1 // tiny integer
            aadd( aTinyIntFields, j )
         endif
      next j
      asize(tablearr,0)
      for i := 1 to table:lastrec()
         asize(rowarr,0)     
         currow := table:getrow(i)
         for j := 1 to table:fcount()         
            aadd(rowarr,currow:fieldget(j))
         next j
         for j := 1 to len( aTinyIntFields )
            if rowarr[ aTinyIntFields[ j ] ] > 0
               rowarr[ aTinyIntFields[ j ] ] := .t.
            else
               rowarr[ aTinyIntFields[ j ] ] := .f.
            endif
         next j
         aadd(tablearr,aclone(rowarr))
      next i
   endif
   table:destroy()
   set(_SET_DATEFORMAT,curdateformat)
   return tablearr
endif
return tablearr
Hi rathinagiri !
The problem has now been resolved after several days of work
I thank you all for your precious help
Now the problem is another
The "hb_sendMail" function is not working in this new version. Has there been any change in this function?
Best Regards
Carlos Reis, Portugal
39º 46' 47" N
08º 55' 45 W
User avatar
danielmaximiliano
Posts: 2763
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: Compilation problem with version 3.0.45

Post by danielmaximiliano »

Carlos Reis wrote:
Now the problem is another
The "hb_sendMail" function is not working in this new version. Has there been any change in this function?

Hola Carlos / Hi Carlos

intente con HMG.3.0.46 / Try With HMG.3.0.46


agregue esta lineas en / Add this lines in c:\hmg.3.0.46\hmg.hbc

line #49

Code: Select all

# ***** include this lines *****
libs=hbssl
libs=libeay32
libs=ssleay32
Libs=hbtip
Libs=hbtipssl
# ***** include this lines *****
Mire aqui / Loook here
ultimo Post / Last post

http://hmgforum.com/viewtopic.php?f=9&t=2559&start=10
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
User avatar
Carlos Reis
Posts: 16
Joined: Sat Oct 09, 2010 3:31 pm
Location: Portugal

Re: Compilation problem with version 3.0.45

Post by Carlos Reis »

danielmaximiliano wrote:
Carlos Reis wrote:
Now the problem is another
The "hb_sendMail" function is not working in this new version. Has there been any change in this function?

Hola Carlos / Hi Carlos

intente con HMG.3.0.46 / Try With HMG.3.0.46


agregue esta lineas en / Add this lines in c:\hmg.3.0.46\hmg.hbc

line #49

Code: Select all

# ***** include this lines *****
libs=hbssl
libs=libeay32
libs=ssleay32
Libs=hbtip
Libs=hbtipssl
# ***** include this lines *****
Mire aqui / Loook here
ultimo Post / Last post

http://hmgforum.com/viewtopic.php?f=9&t=2559&start=10
hello Daniel !
thanks for listening my problem.
I downloaded the version HMG 3.0.46 changed the file c: \ hmg.3.0.46 \ hmg.hbc like you said.
I compiled the program again, but the result was the same.
it could not send the email.
but if I compile the same program with a previous version (HMG.3.0.35), works fine and sends the email
what can I be doing wrong?

the settings on the computer are exactly the same in both cases only changes the version of HMG
Best Regards
Carlos Reis, Portugal
39º 46' 47" N
08º 55' 45 W
User avatar
danielmaximiliano
Posts: 2763
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: Compilation problem with version 3.0.45

Post by danielmaximiliano »

Carlos Reis wrote: hello Daniel !
thanks for listening my problem.
I downloaded the version HMG 3.0.46 changed the file c: \ hmg.3.0.46 \ hmg.hbc like you said.
I compiled the program again, but the result was the same.
it could not send the email.
but if I compile the same program with a previous version (HMG.3.0.35), works fine and sends the email
what can I be doing wrong?

the settings on the computer are exactly the same in both cases only changes the version of HMG
Hi Carlos:
the latest version of HMG is installed in c: \ hmg.3.0.46, is that writing was introduced error.
Send me your code as an example so you can test the operation here.
in my case I have perfect operation with other email servers with Gmail
SSL support.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
User avatar
Carlos Reis
Posts: 16
Joined: Sat Oct 09, 2010 3:31 pm
Location: Portugal

Re: Compilation problem with version 3.0.45

Post by Carlos Reis »

danielmaximiliano wrote:
Carlos Reis wrote: hello Daniel !
thanks for listening my problem.
I downloaded the version HMG 3.0.46 changed the file c: \ hmg.3.0.46 \ hmg.hbc like you said.
I compiled the program again, but the result was the same.
it could not send the email.
but if I compile the same program with a previous version (HMG.3.0.35), works fine and sends the email
what can I be doing wrong?

the settings on the computer are exactly the same in both cases only changes the version of HMG
Hi Carlos:
the latest version of HMG is installed in c: \ hmg.3.0.46, is that writing was introduced error.
Send me your code as an example so you can test the operation here.
in my case I have perfect operation with other email servers with Gmail
SSL support.
Hello Daniel
the routine of sending email is inserted into a much larger program.
so I quickly created a simple example that works on the old version HMG 3.0.35
but does not work in the new version HMG 3.0.46
Here I send the routine EnvEmail.prg:
Attachments
EnvEMail.zip
(1.94 KiB) Downloaded 241 times
Best Regards
Carlos Reis, Portugal
39º 46' 47" N
08º 55' 45 W
User avatar
danielmaximiliano
Posts: 2763
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: Compilation problem with version 3.0.45

Post by danielmaximiliano »

Carlos Reis wrote:
Hello Daniel
the routine of sending email is inserted into a much larger program.
so I quickly created a simple example that works on the old version HMG 3.0.35
but does not work in the new version HMG 3.0.46
Here I send the routine EnvEmail.prg:
HB_Sendmail Work

Code: Select all

/*
 * $Id: gmail.prg 18434 2012-11-04 13:48:43Z vszakats $
 */

/*
 * Copyright 2009 Viktor Szakats (harbour syenar.net)
 * www - http://harbour-project.org
 */

#require "hbssl"
#require "hbtip"

REQUEST __HBEXTERN__HBSSL__

#include "simpleio.ch"

PROCEDURE Main( cFrom, cPassword, cTo )

   IF ! tip_SSL()
      ? "Error: Requires SSL support"
      RETURN
   ENDIF

   hb_default( @cFrom    , "user@gmail.com" )
   hb_default( @cPassword, "1234567890" )
   hb_default( @cTo      , "danielmaximiliano@yahoo.com.ar" )

   ? hb_SendMail( ;
      "smtp.gmail.com", ;
      465, ;
      cFrom, ;
      cTo, ;
      NIL /* CC */, ;
      {} /* BCC */, ;
      "test: body", ;
      "test: subject", ;
      NIL /* attachment */, ;
      cFrom, ;
      cPassword, ;
      "", ;
      NIL /* nPriority */, ;
      NIL /* lRead */, ;
      .T. /* lTrace */, ;
      .F., ;
      NIL /* lNoAuth */, ;
      NIL /* nTimeOut */, ;
      NIL /* cReplyTo */, ;
      .T. )

   RETURN
Can you set the output port to 465 STMP if applicable, with that port so I can communicate with no port 25, you can also change the password '0123456789 '

Pop3.log
20121114-15:46:25 :INETCONNECT( origem, 123456789 )
>> <pointer> <<

20121114-15:46:25 :INETERRORCODE( <pointer> )
user : 'origem'
password : ' origem'

Example configuration SMTP
Configuración de la cuenta_2012-11-14_15-51-15.jpg
Configuración de la cuenta_2012-11-14_15-51-15.jpg (69.29 KiB) Viewed 4731 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
Post Reply