I use FiveHCM.LIB from FWH 6.2 in my win32 console utility. Here is the link script:
/out:con_old.exe
/subsystem:console
con_old
rtl.lib
vm.lib
gtwin.lib
lang.lib
macro.lib
rdd.lib
ace32.lib
rddads.lib
dbfntx.lib
dbfcdx.lib
hbsix.lib
dbffpt.lib
debug.lib
common.lib
pp.lib
codepage.lib
C:\AAPL\C3\FWH.o9\LIB\FiveHCM.lib
c:\aapl\c3\vc\lib\kernel32.lib
c:\aapl\c3\vc\lib\user32.lib
Hera are the compiler options - Harbour is Alpha build 45.0 Intl. (Flex)
harbour con_old.prg /M /N /Q /W /A /V /B /P
cl.exe -TP -W3 -c /GA /FoCON_old.obj CON_old.c
And this is sample PRG:
- Code: Select all Expand view
- #include "fivewin.ch"
***************
function main()
***************
* Test of FWH function AnsiToOem in win32 console application
QOUT( Version() )
QOUT( FWVERSION )
QOUT( '-------------------------------------------------------------' )
QOUT( 'Ansi: ' + 'čšćđž ČŠĆĐŽ \|€[]@{}§<>÷פߣł' )
QOUT( 'AnsiToOem: ' + AnsiToOem('čšćđž ČŠĆĐŽ \|€[]@{}§<>÷פߣł') )
QOUT( '-------------------------------------------------------------' )
QOUT( '' )
return NIL // main
Now I want to use FWH 9.01 and Harbour 1.0.1 but I have difficulties ...
First I renamed Harbour LIB-s and tried to compile/link, but I received the following errors:
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library
con_new.obj : error LNK2001: unresolved external symbol _HB_FUN_FW_GT
hbrtl.lib(gtsys.obj) : error LNK2001: unresolved external symbol _HB_FUN_HB_GT_GUI
So I added /NODEFAULTLIB:LIBCMT and replaced GTWIN with GTGUI in link script:
/out:con_new.exe
/subsystem:console
/NODEFAULTLIB:LIBCMT
con_new
hbrtl.lib
hbvm.lib
gtgui.lib
xhb.lib
hblang.lib
hbmacro.lib
hbrdd.lib
hbct.lib
rddntx.lib
rddcdx.lib
hbsix.lib
rddfpt.lib
rddads.lib
ace32.lib
hbdebug.lib
hbcommon.lib
hbpp.lib
hbcpage.lib
c:\aapl\c3\fwh\lib\FiveHCM.lib
c:\aapl\c3\vc\lib\kernel32.lib
c:\aapl\c3\vc\lib\user32.lib
and added the following lines to PRG:
- Code: Select all Expand view
- REQUEST HB_GT_GUI_DEFAULT
PROCEDURE HB_GTSYS() ; return
procedure FW_GT ; return
Now the executable is generated without errors but unfortunately it does not work: When I start the EXE nothing happens!
Should I use another options for MS C Compiler - currently I use: cl.exe -TP -W3 -c /GA /FoCON_new.obj CON_new.c ? Any ideas?
Thanks, Roman