Harbour Compiler Build Questions ! UPDATED *

Re: Harbour Compiler Build Questions ! UPDATED *

Postby Antonio Linares » Mon Jun 13, 2011 10:52 pm

Tim,

but I get a huge number of undefineds for all the ADS functions


Please post here some of them so we can check whats the problem, thanks :-)

If I take out calls to ADS, and configure it for DBFCDX, the program will run. HOWEVER ( and this is huge ), it is painfully slow


This is really strange. I have not seen any other Harbour user to mention this. Could you try to isolate a small PRG example to test it ?

I am sure the Harbour devel team would love to review such example, thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour Compiler Build Questions ! UPDATED *

Postby TimStone » Mon Jun 13, 2011 10:52 pm

Drop my comment on speed. I rebuilt it in "Release" mode and the speed is good ! All original builds were in "Debug" mode which is very slow.

So now my primary issue is how to get ADS working !
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Harbour Compiler Build Questions ! UPDATED *

Postby Antonio Linares » Tue Jun 14, 2011 12:10 am

Tim,

but I get a huge number of undefineds for all the ADS functions


Please post here some of them so we can check whats the problem, thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour Compiler Build Questions ! UPDATED *

Postby TimStone » Tue Jun 14, 2011 12:23 am

There are 284. Basically every ADS function in the library is "undefined". I don't call most of those, but they apparently are called as a result of what the few I do use.

My calls are:

// ADS Server settings
REQUEST ADS
rddRegister( "ADS", 1 )
rddsetdefault( "ADS" )
AdsSetServerType( nServer ) // 7 )
AdsSetFileType(ADS_CDX)
AdsSetDeleted(.t.)
AdsLocking(.f.)
AdsRightsCheck(.f. )
AdsSetDefault( cPath )

And
EXTERN ADSKeyCount, ADSKeyNo, AdsGetRelKeyPos, AdsSetRelKeyPos

Plus ADSConnect60, and ADSGetLastError()


Here are the ADS errors:

rddads.lib(ads1.obj) : error LNK2019: unresolved external symbol _AdsSetDecimals@4 referenced in function "void __cdecl adsSetListener_callback(enum HB_set_enum,enum HB_set_listener_enum)" (?adsSetListener_callback@@YAXW4HB_set_enum@@W4HB_set_listener_enum@@@Z)
rddads.lib(ads1.obj) : error LNK2019: unresolved external symbol _AdsSetSearchPath@4 referenced in function "void __cdecl adsSetListener_callback(enum

... ( others removed for brevity )

asw9.exe : fatal error LNK1120: 195 unresolved externals
ASW9h.EXE - 235 error(s), 6 warning(s)

THIS PROBLEM WAS RESOLVED with a new ACE32.lib file
Last edited by TimStone on Wed Jun 15, 2011 3:58 pm, edited 1 time in total.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Harbour Compiler Build Questions ! UPDATED *

Postby Antonio Linares » Tue Jun 14, 2011 7:26 am

Tim,

Are you using the most recent ace32.dll ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour Compiler Build Questions ! UPDATED *

Postby Antonio Linares » Tue Jun 14, 2011 7:37 am

Tim,

Ok, I think I know what is going on... :-)

You can not use Borland implib to create the LIB, as it uses a different format as the one used by Microsoft

You have to create it this way:

c:\bcc582\bin\impdef.exe ace32.def ace32.dll

(Microsoft lib.exe)
lib.exe /def:ace32.def /out:ace32.lib /MACHINE:IX86
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour Compiler Build Questions ! UPDATED *

Postby TimStone » Tue Jun 14, 2011 1:22 pm

I don't have Borland Implib.

I used the ImpLib32 that was included with VC98 ( Microsoft ).

I also tried using the ACE32 supplied with the xHarbour ( Pelles Microsoft C compatible ) libraries.

I'm wondering if linking position has anything to do with this.

How is ADS linked with Borland ? Is it just rddads ?
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Harbour Compiler Build Questions ! UPDATED *

Postby Antonio Linares » Tue Jun 14, 2011 5:44 pm

Tim,

I have just emailed the resulting ace32.lib (for Microsoft) to you :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour Compiler Build Questions ! UPDATED *

Postby TimStone » Tue Jun 14, 2011 5:59 pm

Still not working ... same errors.

With the other one I received that builds without errors, I get an error 7078 authentication error which I do not get with the same code built using xHb.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Harbour Compiler Build Questions ! UPDATED *

Postby TimStone » Tue Jun 14, 2011 7:18 pm

OK ... it is working !

Here are the highlights:

Microsoft Visual C++ 2010 ( Visual Studio, Express or Full Version )
Compiler and linker
Harbour Compiler ( supplied with FTDN downloads ! )
FWH 11.6

Working with Advantage Database Server and/or DBFCDX

Built fully within UE Studio '11

This is REALLY nice.

Performance, while slow in the debug builds, is very good in the release builds.

Thanks to all who contributed to this. ( Especially Antonio, but also input from many others ) Now its time for testing testing testing testing !
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Harbour Compiler Build Questions ! UPDATED *

Postby hua » Wed Jun 15, 2011 5:12 am

Congrats on a successful migration Tim. I'm still waddling through.

Antonio,
when I compile the source code below I got the following error message,
guid.prg(47) : error C2664: 'StringFromGUID2' : cannot convert parameter 1 from 'GUID *' to 'const GUID &'
Reason: cannot convert from 'GUID *' to 'const GUID'
No constructor could take the source type, or constructor overload resolution was ambiguous


How can I solve this?

TIA
--
hua

Code: Select all  Expand view  RUN

//-------------------------
// GuID generieren
// Stefan Haupt, April 2005
//-------------------------
#include "FiveWin.ch"

//------------------------------------------------------------------
// standard 32 byte's M$ GuID
//------------------------------------------------------------------
FUNCTION CreateGuID32 (lNoBracket, lNoDash)

LOCAL cGuID := NewGuid()

DEFAULT lNoBracket := .t.
DEFAULT lNoDash    := .f.

IF lNoBracket
  cGuid := strtran(cGuid,"{")
  cGuid := strtran(cGuid, "}")
ENDIF
IF lNoDash
  cGuid := strtran(cGuid,"-")
ENDIF

RETURN (cGuID)



// Many thanks to Valerie for his help
// and these 2 functions

#pragma BEGINDUMP
#include <windows.h>
#include "hbapi.h"

//------------------------------------------------------------------
// standard 32 byte's M$ guid
//------------------------------------------------------------------
HB_FUNC( NEWGUID )
{
GUID guid;
char obuff[38];
memset( obuff, 0x0, 38 );
if ( CoCreateGuid(&guid) == NULL )
   {
    OLECHAR tmpbuff[76];
    StringFromGUID2(&guid,tmpbuff,76);
    WideCharToMultiByte(CP_OEMCP,0,tmpbuff,-1,obuff,38,NULL,NULL);
   }
hb_retclen(obuff,38);
}

#pragma ENDDUMP
 
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Harbour Compiler Build Questions ! UPDATED *

Postby hua » Wed Jun 15, 2011 8:50 am

1. rc.exe seems to choke on
Code: Select all  Expand view  RUN
1041 bitmap loadoncall moveable discardable "j:\sw-dev\hi-res menus\tplus\bmp\1041.bmp"


Possibly due to space in the path name? Is replacing it with a short file name the only solution?

2. All my rc's were created using Borland C++ 5.02, rc spit out another error message
common.rc (8): error RC2104 : undefined keyword or key name: DS_MODALFRAME


What's the correct solution to this? Should I stop using BRW?

TIA
--
hua
Last edited by hua on Wed Jun 15, 2011 9:52 am, edited 1 time in total.
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Harbour Compiler Build Questions ! UPDATED *

Postby hua » Wed Jun 15, 2011 8:59 am

I compile using batch files and rmk's (Clipper's rmake) with macro definition to control compiling,
Code: Select all  Expand view  RUN
rem link.bat
call rmake jnl /d%1


Code: Select all  Expand view  RUN

// jnl.rmk
#ifdef PACKAGE1
 switch=/dPACKAGE1
#else
  #ifdef PACKAGE2
    switch=/dPACKAGE2
  #else
    switch=
  #endif
#endif

.prg.obj:
   c:\hb21\bin\harbour $< $(switch) /m /p /n /q /ic:\fwh\include;c:\hb21\include  > comp.log
 


How to achieve the same effect using nmake? I already created my make file, just not sure how to implement the conditional compiling logic outlined above.

TIA
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Harbour Compiler Build Questions ! UPDATED *

Postby hua » Wed Jun 15, 2011 9:44 am

hua wrote:I compile using batch files and rmk's (Clipper's rmake) with macro definition to control compiling,
Code: Select all  Expand view  RUN
rem link.bat
call rmake jnl /d%1


Code: Select all  Expand view  RUN

// jnl.rmk
#ifdef PACKAGE1
 switch=/dPACKAGE1
#else
  #ifdef PACKAGE2
    switch=/dPACKAGE2
  #else
    switch=
  #endif
#endif

.prg.obj:
   c:\hb21\bin\harbour $< $(switch) /m /p /n /q /ic:\fwh\include;c:\hb21\include  > comp.log
 


How to achieve the same effect using nmake? I already created my make file, just not sure how to implement the conditional compiling logic outlined above.


Solved the nmake part. :)
Code: Select all  Expand view  RUN
rem link.bat
if "%1"=="" goto NoDefine
call nmake -fjnl.mak SWITCH=/d%1


Code: Select all  Expand view  RUN
# nmake's make file
.prg.c:
   $(HBDIR)\bin\harbour $< $(SWITCH) /n /i$(FWDIR)\include;$(HBDIR)\include
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Harbour Compiler Build Questions ! UPDATED *

Postby TimStone » Wed Jun 15, 2011 3:52 pm

I see you posted a lot of questions "overnight". I know Antonio has been working on these things very late at night ( or early morning his time ), so responses may be delayed from him.

If you have questions you can AIM chat ( MLSDG ) for a faster response, or email me directly ( "timstone@masterlinksoftware.com" ). I don't monitor the forum all day but email and IM are always live.

What tools are you using. It would appear you are implementing Harbour, but what C compiler ? I missed that.

I am using Visual Studio 2010, and Antonio is using the Express ( Free ) version for the linking and VC++ compiler.

I am using the build created in UE Studio but I believe there is a make utility in the Harbour bin.

RC's are a bit more interesting. The bottom line is that you can simply link in an .res file created with an rc compiler. I am using the one from VC 98 because the ones with VC 2005, VC 2008, and VC 2010 have issues with symbols and the linker. I've also successfully used the .res created with xBuilder.

I actually do most of my .rc file editing with a text editor. That may sound difficult, but once you understand how the line of code is structured, it makes it easy to line up all the controls vertically and horizontally. UE Studio allows you to edit the text and then display the result which is fine. If you are using Borlands Resource editor, get rid of the Borland specific controls / code. That gives you more flexibility. Someone posted, I believe earlier in this thread, about a free .rc compiler you can check out.

I still have some issues to resolve, but the majority of my program is now working. Yes, it is a very large, complex, program so my statement is significant !
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 43 guests