HMG 3.0.36 (Test)
Moderator: Rathinagiri
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMG 3.0.36 (Test)
Ok.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.36 (Test)
I'm being successfull 'cleaning' hmg.hbc' file and it is 'human-readable' now, except for the following:rathinagiri wrote:Ok.
Code: Select all
libs=${hb_name}${__HB_DYN__}
TIA.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: HMG 3.0.36 (Test)
AFAIR It's used to link dynamic libs (dll) to the program.
ref:
2010-07-31 01:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
...
* contrib/hbmzip/hbmzip.hbc
* contrib/hbxbp/hbxbp.hbc
* contrib/hbnetio/hbnetio.hbc
+ Added experimental support to request libs in dynamic (.dll) flavour.
Currently this can be enabled by setting envvar: __HB_DYN__=_dll
To make this work one has to build all contribs using HB_BUILD_CONTRIB_DYN=yes
beforehand.
Angel Pais
Web Apps consultant/architect/developer.
Web Apps consultant/architect/developer.
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.36 (Test)
It's very stange, since if I remove it, I'm not able to build apps (I get lots of undefined references)...apais wrote:AFAIR It's used to link dynamic libs (dll) to the program.
<...>
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.36 (Test)
Mysql is broken in .36.rathinagiri wrote:Ok.
When I try to build a mysql application I get these error from the linker:
andundefined reference to mysql_ping@4
These kind of errors arises when libhbmysql and libmysql were created from different mysql header files.undefined reference to mysql_real_escape_string@16
Had you noticed about that/fixed?
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMG 3.0.36 (Test)
Hi Roberto,
No. I am also couldn't connect MySQL server. For me it had shown that libmysql is not found.
It comes from HMG 4's hmg.hbc.Do you (or someone else) remember from where it come and what is its purpose?
No. I am also couldn't connect MySQL server. For me it had shown that libmysql is not found.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.36 (Test)
I mean, who contributed (created) the file. He has the answer I'm looking for.rathinagiri wrote:Hi Roberto,
It comes from HMG 4's hmg.hbc.Do you (or someone else) remember from where it come and what is its purpose?
I insist with this, because I do not like (and isn't good at all) having something there that we don't understand.
If you instruct hbmk2 to link the two involved libraries (libmysql and libhbmysql) the libraries are found and the error shown by the linker is the one I've posted.rathinagiri wrote: No. I am also couldn't connect MySQL server. For me it had shown that libmysql is not found.
Here are the instructions I've created to guide the users to solve this problem and published along mysql samples:
To be more clear...To run this sample you need MySql client library:
- libmySQL.dll
This library is inluded in MySql distribution (http://www.mysql.com)
libmysql.a (located at \hmg\harbour\lib) must be built from libmySQL.dll
and libmySQL.def files (included in your MySql installation) using dlltool
utility (located at \hmg\mingw\bin) with the following command:
dlltool --input-def libmySQL.def --dllname libmySQL.dll --output-lib libmySQL.a -k
libmysql.a file included in this hmg distribution was created from libmysql.def
and libmysql.dll from X.X.XX version.
hbmysql Harbour library is built using an Mysql include file ("mysql.h").
You can check this lookking at harbour/contrib/hbmysql.
In the line #75 of mysql.c you'll find:
Code: Select all
#include "mysql.h"
You must build libmysql using the same version of mysql.h used to build libhbmysql.
That information must be included in Harbour binaries. If not, we should ask in Harboue developers list.
You should try this youself to be able to solve the problem when I'm not here
I'll try anyway
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.36 (Test)
The MySql version used to build libhbmysql in current SVN binaries is 5.5.13.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 3.0.36 (Test)
Rathi,
We finally have a nice, clean and beautiful hmg.hbc file
This is it:
Please, check it. Maybe I've forgot some library.
Note that libraries are directly invoked now, so we will not need .hbc contrib files for any of them.
This is the brand new, simplified build.bat:
Note that redir utility is not needed anymore. You can delete safely from util folder.
Please, test it.
TIA.
Thanks to Viktor and Maurizio for their help.
[EDIT]:
Errata:
Please change the line:
with:
We finally have a nice, clean and beautiful hmg.hbc file
This is it:
Code: Select all
# paths
incpaths=/.
incpaths=include
libpaths=lib
# main hmg libs
libs=hmg
libs=crypt
libs=edit
libs=editex
libs=graph
libs=hfcl
libs=hmgmysql
libs=hmgpgsql
libs=hmgsqlite
libs=ini
libs=report
# system
libs=msvfw32
libs=vfw32
# harbour contrib
libs=hbct
libs=hbwin
libs=hbmzip
libs=minizip
libs=hbmemio
libs=hbmisc
libs=hbmysql
libs=mysql
libs=hbtip
libs=sqlite3
Note that libraries are directly invoked now, so we will not need .hbc contrib files for any of them.
This is the brand new, simplified build.bat:
Code: Select all
@echo off
rem ******************************************************************************
rem DELETE FILES FROM PREVIOUS BUILD
rem ******************************************************************************
if exist build.log del build.log
if exist error.log del error.log
rem ******************************************************************************
rem SET HMGPATH
rem -----------
rem
rem Using %~dp0 the HMGPATH is automatically set to current (hmg) folder making it
rem portable (zero config)
rem
rem ******************************************************************************
SET HMGPATH=%~dp0
rem ******************************************************************************
rem SET BINARIES PATHS
rem ******************************************************************************
SET PATH=%HMGPATH%\harbour\bin;%HMGPATH%\mingw\bin;%PATH%
rem *******************************************************************************
rem ******************************************************************************
rem COMPILE RESOURCES
rem ******************************************************************************
echo #define HMGRPATH %HmgPath%\RESOURCES > _hmg_resconfig.h
COPY /b %HMGPATH%\resources\hmg.rc+%~n1.rc+%HMGPATH%\resources\filler _temp.rc >NUL
windres -i _temp.rc -o _temp.o >hbmk.log 2>&1
rem *******************************************************************************
rem *******************************************************************************
rem SET PROJECT OUTPUT FILE NAME
rem ----------------------------
rem
rem The first parameter sent to hbmk2 is -o%~n1.exe. I've added to it create the
rem application with the project basename (<projectname.hbp> specified by the user.
rem
rem *******************************************************************************
rem *******************************************************************************
rem SET DEFAULT CONFIGURATION FILE
rem ------------------------------
rem
rem The second parameter sent to hbmk2 is the hmg.hbc script to set config required.
rem
rem *******************************************************************************
rem *******************************************************************************
rem SET GUI APPLICATION AS DEFAULT
rem ------------------------------
rem
rem The third parameter sent to hbmk1 is -gtgui to build a GUI app. by default
rem
rem *******************************************************************************
rem *******************************************************************************
rem LINK COMPILED RESOURCES
rem -----------------------
rem
rem The fourth parameter sent to hbmk1 is '_temp.o' compiled resources to be linked
rem
rem *******************************************************************************
rem ******************************************************************************
rem CALL HBMK2
rem ******************************************************************************
HBMK2 -o%~n1.exe %HMGPATH%\hmg.hbc -gtgui _temp.o %1 %2 %3 %4 %5 %6 %7 %8 >hbmk.log 2>&1
rem *******************************************************************************
rem ******************************************************************************
rem CREATE LOGS
rem ******************************************************************************
if errorlevel 1 if exist windres.log copy /a windres.log+hbmk.log error.log >nul
if errorlevel 1 if not exist windres.log copy /a hbmk.log error.log >nul
if errorlevel 0 if exist windres.log copy /a windres.log+hbmk.log build.log >nul
if errorlevel 0 if not exist windres.log copy /a hbmk.log build.log >nul
rem ******************************************************************************
rem CLEANUP
rem ******************************************************************************
if exist windres.log del windres.log
if exist hbmk.log del hbmk.log
if exist _hmg_resconfig.h del _hmg_resconfig.h
if exist _temp.rc del _temp.rc
if exist _temp.o del _temp.o
rem ******************************************************************************
rem SHOW LOG
rem ******************************************************************************
if exist error.log type error.log
if exist build.log type build.log
Please, test it.
TIA.
Thanks to Viktor and Maurizio for their help.
[EDIT]:
Errata:
Please change the line:
Code: Select all
windres -i _temp.rc -o _temp.o >hbmk.log 2>&1
Code: Select all
windres -i _temp.rc -o _temp.o >windres.log 2>&1
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMG 3.0.36 (Test)
That is Fantastic!
Only one thing. hmgsqlite, hmgmysql and hmgpgsql are just bridges created by me, which needn't be included by default because all the three have the same function names sql(), connect2db(), miscsql(). IMHO, it can be included by the users themselves if they want to use the bridge.
So, there is no change in IDE?
Only one thing. hmgsqlite, hmgmysql and hmgpgsql are just bridges created by me, which needn't be included by default because all the three have the same function names sql(), connect2db(), miscsql(). IMHO, it can be included by the users themselves if they want to use the bridge.
So, there is no change in IDE?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.