Building Harbour under Borland Compilers

294 views
Skip to first unread message

Mel Smith

unread,
Aug 4, 2015, 12:14:31 PM8/4/15
to Harbour Users
Hi:
I currently build harbour 3.2 under MinGw 5.1.0 successfully.

I would like to test building Harbour under various Borland Compilers on my dev machine (I currently have BCC 5.5, 5.8, and 7.0)

Question:
What steps do I take to build harbour under the Borland C compilers ?

Thanks.

-Mel Smith

Klas Engwall

unread,
Aug 4, 2015, 3:50:22 PM8/4/15
to harbou...@googlegroups.com
Hi Mel,
There should be no difference building with this or that compiler. Just
make sure that the C compiler of your choice is in the path and *no*
other C compiler or compiler version is in the path at the same time.

Further details can be found in the "How to Build" section of the
README.md file in the Harbour root directory.

Regards,
Klas

Mel Smith

unread,
Aug 4, 2015, 5:01:40 PM8/4/15
to Harbour Users
Hi Klas:

I'll give it a try tomorrow.

Thanks for the response.

-Mel

Mel Smith

unread,
Aug 4, 2015, 8:16:27 PM8/4/15
to Harbour Users
Hi Klas:

   Things went well *until* the build failed with 'unable to locate unicows.dll'.

   Then, I went google-looking for this dll and found a free downloadable unicows.dll.7z file, unzipped it, and placed it in the c:\windows\system32\ sub-dir.

   Then, when I re-started the build, I had more errors: (e.g., 'the procedure point _SetLastError@4 could not be located in the dynamic link library unicows.dll'.

   So, I need a bit more help please.

Thanks,

-Mel Smith

Mel Smith

unread,
Aug 4, 2015, 8:50:14 PM8/4/15
to Harbour Users
Addendum:

   The above was building Harbour with BCC 7.0.
 
   I just tried again with BCC 5.5, and it worked correctly.

   Hmmmmm ?????

Comments welcome !

-Mel

Klas Engwall

unread,
Aug 4, 2015, 10:08:34 PM8/4/15
to harbou...@googlegroups.com
Hi Mel,

> Things went well *until* the build failed with 'unable to locate
> unicows.dll'.
>
> Then, I went google-looking for this dll and found a free
> downloadable unicows.dll.7z file, unzipped it, and placed it in the
> c:\windows\system32\ sub-dir.
>
> Then, when I re-started the build, I had more errors: (e.g.,
> 'the procedure point _SetLastError@4 could not be located in the
> dynamic link library unicows.dll'.
>
> So, I need a bit more help please.
>
> Thanks,
>
> -Mel Smith
>
> Addendum:
>
> The above was building Harbour with BCC 7.0.
> I just tried again with BCC 5.5, and it worked correctly.
>
> Hmmmmm ?????
>
> Comments welcome !

To begin with, BCC is *very* uncommonly used "on this side of the x"
:-). Harbour programmers very much prefer MinGW over BCC. So I suspect
you will have a hard time finding many people with BCC experience in the
Harbour community.

About Unicows, even if my life depended on it, I could not tell you why
BCC would want it. It is used for Win9x support in applications, and who
uses Win9x these days? Do you have any leftover settings from building
xHarbour in your path or environment that might trigger including it?
What I have actually seen many times in this newsgroup is that xHarbour
developers come to Harbour having lots of unneeded stuff in their
environments. So I can only suggest to take a good look at that and
remove any settings you don't need. You should really only need to
specify the path to the C compiler, as suggested in the readme.

Regards,
Klas

carloskds

unread,
Aug 5, 2015, 12:11:00 AM8/5/15
to Harbour Users
in
\core-master.zip\core-master\lib\3rd\win\bcc
exist the unicows.lib, replace this lib to borland libs folder.

salu2
carlos vargas

Przemyslaw Czerpak

unread,
Aug 5, 2015, 8:43:15 AM8/5/15
to harbou...@googlegroups.com
On Tue, 04 Aug 2015, Mel Smith wrote:

Hi Mel,

> Things went well *until* the build failed with 'unable to locate
> unicows.dll'.
> Then, I went google-looking for this dll and found a free downloadable
> unicows.dll.7z file, unzipped it, and placed it in the c:\windows\system32\
> sub-dir.
> Then, when I re-started the build, I had more errors: (e.g., 'the
> procedure point _SetLastError@4 could not be located in the dynamic link
> library unicows.dll'.
> So, I need a bit more help please.

This is quite common problem with BCC reported here.
Newer BCC versions comes with its own unicows.lib in
lib/psdk directory and this library refers to above
function.
Usually it's not a problem because Harbour correctly
sets all paths and gives higher priority to
harbour/lib/3rd/win/bcc directory where you can find
correct version of BCC. Anyhow in your case you have
installation where BCC bin/ilink32.cfg contains
-L option with reference to BCC lib/psdk path what
changes the priority. For BCC -I and -L paths defined
in bin/bcc32.cfg and bin/ilink32.cfg have the highest
priority. Unfortunately some peoples suggested to use
bin/bcc32.cfg and bin/ilink32.cfg and even add local
paths to these files and now it often creates problems,
i.e. few users tried to compile Harbour having references
to xHarbour installation in above BCC .cfg files.
As you can imagine results of such compilation were
completely broken.
For Harbour only you can remove or rename above BCC
files. Harbour will set all paths correctly.
If you do not want to change them and you do not have
any references to other then core BCC paths inside
(all such references can create conflicts with Harbour
core files) then you can keep them but you should
replace lib/psdk/unicows.lib with
harbour/lib/3rd/win/bcc/unicows.lib.

best regards,
Przemek

Mel Smith

unread,
Aug 5, 2015, 11:23:04 AM8/5/15
to Harbour Users
Hi Klas, Carlos, and Przemek:

   I implemented the suggestion made by Carlos, and the harbour build under BCC70 worked quickly and properly !

   I also got rid of the unicows.dll from my \windows\system32\ sub-dir 

   Again, the copying of the unicows.lib to the  \borland\bcc70\lib\ and borland\bcc58\lib sub-directories corrected the problem, and I don't need the unicows.dll file anywhere.

Thanks to all !

-Mel

   

carloskds

unread,
Aug 5, 2015, 1:00:39 PM8/5/15
to Harbour Users
HI, to all

I see in bcc\lib\psdk many libs files, where the size is too small, 
for example odbccp32.lib is only 449 byte, and the see file with binary viewer and not definition of sql functions:

  odbccp32 ˆ)   __vsnprintf ODBCCP32.dll
_vsnprintf"ˆ/   LoadLibraryA ODBCCP32.dll _LoadLibraryA@4 ˆ=   GetSystemDirectoryA ODBCCP32.dll _GetSystemDirectoryA@8Þˆ<   GetModuleFileNameA ODBCCP32.dll _GetModuleFileNameA@12[ˆ3   GetProcAddress ODBCCP32.dll _GetProcAddress@84ˆ.   MessageBoxA ODBCCP32.dll _MessageBoxA@16¥ˆ.   LoadStringA ODBCCP32.dll _LoadStringA@16“ˆ7   GetModuleHandleA ODBCCP32.dll _GetModuleHandleA@4þŠ   

where old library of 5.x is most large, and contain sql functions: :-(


          é€  
ODBCCPlAppletçˆ"  
ODBCCPlApplet ODBCCP32.dlle ?ˆ  û  tŠ  t           € SQLConfigDataSource'ˆ(   SQLConfigDataSource ODBCCP32.dll Þˆ  û sŠ  t               € SQLConfigDataSourceWΈ)   SQLConfigDataSourceW ODBCCP32.dllÎ ½ˆ  û rŠ  t             € SQLConfigDriver®ˆ$   SQLConfigDriver ODBCCP32.dll Vˆ  û qŠ  t       € SQLConfigDriverWUˆ%   SQLConfigDriverW ODBCCP32.dllÝ 5ˆ  û pŠ  t     € SQLCreateDataSource)ˆ(   SQLCreateDataSource ODBCCP32.dll Úˆ  û oŠ  t               € SQLCreateDataSourceExhˆ*   SQLCreateDataSourceEx ODBCCP32.dll ˆ  û nŠ  t           € SQLCreateDataSourceExW ˆ+   SQLCreateDataSourceExW ODBCCP32.dllæ æˆ  û mŠ  t         € SQLCreateDataSourceWЈ)   SQLCreateDataSourceW ODBCCP32.dllÔ ¹ˆ  û lŠ  t             € SQLGetAvailableDriversâˆ+   SQLGetAvailableDrivers ODBCCP32.dll šˆ  û kŠ  t         € SQLGetAvailableDriversW‰ˆ,   SQLGetAvailableDriversW ODBCCP32.dllÍ yˆ  û
 jŠ  t       € SQLGetConfigModesˆ%   SQLGetConfigMode ODBCCP32.dll ˆ  û iŠ  t     € SQLGetInstalledDriversÈ+   SQLGetInstalledDrivers ODBCCP32.dll |ˆ  û hŠ  t         € SQLGetInstalledDriversWjˆ,   SQLGetInstalledDriversW ODBCCP32.dllÌ [ˆ  û
 gŠ  t       € SQLGetPrivateProfileString ˆ/   SQLGetPrivatePr................................

for example.

salu2
carlos vargas

Reply all
Reply to author
Forward
0 new messages