Page 1 of 1

error with new buildhd.bat

Posted: Sat Jul 15, 2006 12:06 pm
by Ehab Samir Aziz
??????????????????????????????????????????????????????????????????????????????
? FiveWin for Harbour 2.7 - June 2006 Harbour development power ??
? (c) FiveTech, 1993-2006 for Microsoft Windows 95/98/NT/2000/ME and XP ??
???????????????????????????????????????????????????????????????????????????????
ب ?????????????????????????????????????????????????????????????????????????????
Compiling...
Harbour Compiler Alpha build 46.2 (Flex)
Copyright 1999-2006, http://www.harbour-project.org/
Compiling 'sitex.prg' and generating preprocessed output to 'sitex.ppo'...
Lines 2941, Functions/Procedures 43
Generating C source output to 'sitex.c'... Done.
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
sitex.c:
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Warning: Image linked as an executable, but with a .DLL or .BPL extension
* self contained DLL successfully built
'sitex' is not recognized as an internal or external command,
operable program or batch file.

Posted: Sat Jul 15, 2006 12:18 pm
by Antonio Linares
Ehab,

Have you checked for a sitex.dll file ? It should be there. And it has to be executed from an EXE. You can't run a DLL by itself.

Posted: Sat Jul 15, 2006 9:05 pm
by Ehab Samir Aziz
How can I call DLL from EXE directly ?

Posted: Sun Jul 16, 2006 8:02 am
by Antonio Linares
Ehab,

Please review samples\TestDLLP.prg

Posted: Sun Jul 16, 2006 10:03 am
by Enrico Maria Giordano
Antonio Linares wrote:Ehab,

Have you checked for a sitex.dll file ? It should be there. And it has to be executed from an EXE. You can't run a DLL by itself.
Yes you can. A DLL is considered an executable file by Windows.

EMG

Posted: Sun Jul 16, 2006 10:05 am
by Antonio Linares
Enrico,

Yes, of course, but you can't double click on a DLL and execute it, or type its name, press enter and execute it. Neither you can use WinExec() to run it.

It has to be invoked using LoadLibrary().

Posted: Sun Jul 16, 2006 10:08 am
by Enrico Maria Giordano
Antonio Linares wrote:Enrico,

Yes, of course, but you can't double click on a DLL and execute it, or type its name, press enter and execute it. Neither you can use WinExec() to run it.

It has to be invoked using LoadLibrary().
Normally yes, because a DLL is not write to be self-executing. But if you rename an EXE to DLL then you still can execute it. :-)

EMG

Posted: Sun Jul 16, 2006 11:31 am
by Antonio Linares
Enrico,

> But if you rename an EXE to DLL then you still can execute it.

Thats because EXEs and DLLs have different headers and their startup codes are different. Windows recognizes the EXE even if you rename it.

Another major difference between them, as explained in Charles Petzold "Programming Windows" book, is that a DLL uses the DATA segment of the EXE that calls the DLL, thats why a DLL can attend multiple EXEs simultaneously.

Posted: Sun Jul 16, 2006 11:35 am
by Enrico Maria Giordano
Antonio Linares wrote:Windows recognizes the EXE even if you rename it.
Ops, you are right. I can rename the EXE with any extension and it is still executable.

EMG

Posted: Sun Jul 16, 2006 11:21 pm
by Ehab Samir Aziz
as to finalize the conversation which batch should I use to create EXE application I use rdd server in it in new FHW June2006 ?

Posted: Mon Jul 17, 2006 12:51 am
by Antonio Linares
Ehab,

samples\buildh.bat for Harbour
samples\buildx.bat for xharbour