Re: HMG 3.0.36 (Test)
Posted: Sat Jun 18, 2011 1:53 pm
Ok. 

Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
http://mail.hmgforum.com/
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__}
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.
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.
<...>
Mysql is broken in .36.rathinagiri wrote:Ok.
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
It comes from HMG 4's hmg.hbc.Do you (or someone else) remember from where it come and what is its purpose?
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?
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.
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.
Code: Select all
#include "mysql.h"
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
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
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