Fivewin for xHarbour ( MSVC ) Compile or Link Error!
Fivewin for xHarbour ( MSVC ) Compile or Link Error!
Dear All!
MSVC ( Visual Studio 6.0 ) Compile or Link Error
< Buidxm.bat >
@ECHO OFF
CLS
ECHO FiveWin for xHarbour 8.05 (MSVC++) May. 2008 xHarbour development power
ECHO (c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME/XP/Vista
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
set hdir=D:\Ftdn\xharbourm
set vcdir=D:\VC98
set include=%vcdir%\include;%hdir%\include;%include%
set lib=%vcdir%\lib;%hdir%\lib;%lib%
%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log
@type clip.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT
%vcdir%\bin\cl -TP -W3 -c /GA %1.c
:ENDCOMPILE
echo %1.obj > msvc.tmp
echo ..\lib\Fivehmx.lib ..\lib\FiveHCM.lib >> msvc.tmp
echo %hdir%\lib\rtl.lib >> msvc.tmp
echo %hdir%\lib\vm.lib >> msvc.tmp
echo %hdir%\lib\gtgui.lib >> msvc.tmp
echo %hdir%\lib\lang.lib >> msvc.tmp
echo %hdir%\lib\macro.lib >> msvc.tmp
echo %hdir%\lib\rdd.lib >> msvc.tmp
echo %hdir%\lib\dbfntx.lib >> msvc.tmp
echo %hdir%\lib\dbfcdx.lib >> msvc.tmp
echo %hdir%\lib\dbffpt.lib >> msvc.tmp
echo %hdir%\lib\hbsix.lib >> msvc.tmp
echo %hdir%\lib\debug.lib >> msvc.tmp
echo %hdir%\lib\common.lib >> msvc.tmp
echo %hdir%\lib\pp.lib >> msvc.tmp
echo %hdir%\lib\pcrepos.lib >> msvc.tmp
echo %vcdir%\lib\kernel32.lib >> msvc.tmp
echo %vcdir%\lib\user32.lib >> msvc.tmp
echo %vcdir%\lib\gdi32.lib >> msvc.tmp
echo %vcdir%\lib\winspool.lib >> msvc.tmp
echo %vcdir%\lib\comctl32.lib >> msvc.tmp
echo %vcdir%\lib\comdlg32.lib >> msvc.tmp
echo %vcdir%\lib\advapi32.lib >> msvc.tmp
echo %vcdir%\lib\shell32.lib >> msvc.tmp
echo %vcdir%\lib\ole32.lib >> msvc.tmp
echo %vcdir%\lib\oleaut32.lib >> msvc.tmp
echo %vcdir%\lib\uuid.lib >> msvc.tmp
echo %vcdir%\lib\odbc32.lib >> msvc.tmp
echo %vcdir%\lib\odbccp32.lib >> msvc.tmp
echo %vcdir%\lib\mpr.lib >> msvc.tmp
echo %vcdir%\lib\msvcrt.lib >> msvc.tmp
%vcdir%\bin\link @msvc.tmp /NODEFAULTLIB:LIBC /nologo /subsystem:windows /force:multiple
< Tutor01.prg > Compile and Linker
tutor01.c
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
Creating library tutor01.lib and object tutor01.exp
Fivehmx.lib(DLGFIND.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(RADIO.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(PEN.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(INI.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MGET.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TACCTBL.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MENUITEM.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MENU.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TCLIPGET.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(BAR.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TOOLBAR.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(REBAR.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TIMAGLST.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(COMBOBOX.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TMETAFIL.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(STATUSBA.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(BTNBMP.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(RPREVIEW.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MDICLIEN.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TGET.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(RADMENU.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(DDE.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(CURSOR.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MDIFRAME.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(CLIPBRD.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(RECT.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(BITMAP.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(PRINTER.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(BRUSH.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(ICON.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TIMER.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(FONT.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TMSGITEM.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(CONTROL.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TStruct.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MDICHILD.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(SCRLLBAR.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(SAY.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(DIALOG.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MSGBAR.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(WINDOW.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(ACTIVEX.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(REG32.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(BUTTON.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(listbox.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
FiveHCM.lib(BRUSHES.obj) : error LNK2001: unresolved external symbol __imp__AlphaBlend@44
rtl.lib(math.obj) : error LNK2001: unresolved external symbol __HUGE
tutor01.exe : fatal error LNK1120: 3 unresolved externals
* There are errors
MSVC ( Visual Studio 6.0 ) Compile or Link Error
< Buidxm.bat >
@ECHO OFF
CLS
ECHO FiveWin for xHarbour 8.05 (MSVC++) May. 2008 xHarbour development power
ECHO (c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME/XP/Vista
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
set hdir=D:\Ftdn\xharbourm
set vcdir=D:\VC98
set include=%vcdir%\include;%hdir%\include;%include%
set lib=%vcdir%\lib;%hdir%\lib;%lib%
%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log
@type clip.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT
%vcdir%\bin\cl -TP -W3 -c /GA %1.c
:ENDCOMPILE
echo %1.obj > msvc.tmp
echo ..\lib\Fivehmx.lib ..\lib\FiveHCM.lib >> msvc.tmp
echo %hdir%\lib\rtl.lib >> msvc.tmp
echo %hdir%\lib\vm.lib >> msvc.tmp
echo %hdir%\lib\gtgui.lib >> msvc.tmp
echo %hdir%\lib\lang.lib >> msvc.tmp
echo %hdir%\lib\macro.lib >> msvc.tmp
echo %hdir%\lib\rdd.lib >> msvc.tmp
echo %hdir%\lib\dbfntx.lib >> msvc.tmp
echo %hdir%\lib\dbfcdx.lib >> msvc.tmp
echo %hdir%\lib\dbffpt.lib >> msvc.tmp
echo %hdir%\lib\hbsix.lib >> msvc.tmp
echo %hdir%\lib\debug.lib >> msvc.tmp
echo %hdir%\lib\common.lib >> msvc.tmp
echo %hdir%\lib\pp.lib >> msvc.tmp
echo %hdir%\lib\pcrepos.lib >> msvc.tmp
echo %vcdir%\lib\kernel32.lib >> msvc.tmp
echo %vcdir%\lib\user32.lib >> msvc.tmp
echo %vcdir%\lib\gdi32.lib >> msvc.tmp
echo %vcdir%\lib\winspool.lib >> msvc.tmp
echo %vcdir%\lib\comctl32.lib >> msvc.tmp
echo %vcdir%\lib\comdlg32.lib >> msvc.tmp
echo %vcdir%\lib\advapi32.lib >> msvc.tmp
echo %vcdir%\lib\shell32.lib >> msvc.tmp
echo %vcdir%\lib\ole32.lib >> msvc.tmp
echo %vcdir%\lib\oleaut32.lib >> msvc.tmp
echo %vcdir%\lib\uuid.lib >> msvc.tmp
echo %vcdir%\lib\odbc32.lib >> msvc.tmp
echo %vcdir%\lib\odbccp32.lib >> msvc.tmp
echo %vcdir%\lib\mpr.lib >> msvc.tmp
echo %vcdir%\lib\msvcrt.lib >> msvc.tmp
%vcdir%\bin\link @msvc.tmp /NODEFAULTLIB:LIBC /nologo /subsystem:windows /force:multiple
< Tutor01.prg > Compile and Linker
tutor01.c
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
Creating library tutor01.lib and object tutor01.exp
Fivehmx.lib(DLGFIND.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(RADIO.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(PEN.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(INI.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MGET.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TACCTBL.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MENUITEM.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MENU.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TCLIPGET.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(BAR.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TOOLBAR.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(REBAR.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TIMAGLST.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(COMBOBOX.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TMETAFIL.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(STATUSBA.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(BTNBMP.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(RPREVIEW.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MDICLIEN.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TGET.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(RADMENU.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(DDE.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(CURSOR.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MDIFRAME.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(CLIPBRD.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(RECT.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(BITMAP.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(PRINTER.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(BRUSH.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(ICON.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TIMER.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(FONT.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TMSGITEM.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(CONTROL.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(TStruct.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MDICHILD.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(SCRLLBAR.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(SAY.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(DIALOG.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(MSGBAR.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(WINDOW.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(ACTIVEX.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(REG32.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(BUTTON.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
Fivehmx.lib(listbox.obj) : error LNK2001: unresolved external symbol _HB_FUN___CLSACTIVE
FiveHCM.lib(BRUSHES.obj) : error LNK2001: unresolved external symbol __imp__AlphaBlend@44
rtl.lib(math.obj) : error LNK2001: unresolved external symbol __HUGE
tutor01.exe : fatal error LNK1120: 3 unresolved externals
* There are errors
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Oknbs,
Please try this xHarbour for Microsoft build, thanks:
http://rapidshare.com/files/122138902/x ... m.exe.html
Please try this xHarbour for Microsoft build, thanks:
http://rapidshare.com/files/122138902/x ... m.exe.html
Thank you for answer, Antonio
I compiled your new xharbour file but It has errors below.
?FiveWin for xHarbour 8.05 (MSVC++) May. 2008 xHarbour development power
?(c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME/XP/Vista
Compiling...
xHarbour Compiler build 1.1.0 (SimpLex) (Rev. 6138)
Copyright 1999-2008, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'tutor01.prg' and generating preprocessed output to 'tutor01.ppo'...
Generating C source output to 'tutor01.c'...
Done.
tutor01.c
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
Creating library tutor01.lib and object tutor01.exp
FiveHCM.lib(BRUSHES.obj) : error LNK2001: unresolved external symbol __imp__AlphaBlend@44
rtl.lib(math.obj) : error LNK2001: unresolved external symbol __HUGE
tutor01.exe : fatal error LNK1120: 2 unresolved externals
* There are errors
oknbs.
I compiled your new xharbour file but It has errors below.
?FiveWin for xHarbour 8.05 (MSVC++) May. 2008 xHarbour development power
?(c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME/XP/Vista
Compiling...
xHarbour Compiler build 1.1.0 (SimpLex) (Rev. 6138)
Copyright 1999-2008, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'tutor01.prg' and generating preprocessed output to 'tutor01.ppo'...
Generating C source output to 'tutor01.c'...
Done.
tutor01.c
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
Creating library tutor01.lib and object tutor01.exp
FiveHCM.lib(BRUSHES.obj) : error LNK2001: unresolved external symbol __imp__AlphaBlend@44
rtl.lib(math.obj) : error LNK2001: unresolved external symbol __HUGE
tutor01.exe : fatal error LNK1120: 2 unresolved externals
* There are errors
oknbs.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Oknbs,
Please add this code to your main PRG: (Please note that this solution is for MS VC98 users)
This is a working sample: (can be tested with Borland too)
Please add this code to your main PRG: (Please note that this solution is for MS VC98 users)
Code: Select all
#pragma BEGINDUMP
double _HUGE = (1.0/0.0); // infinity
#pragma ENDDUMP
Code: Select all
function Main()
MsgInfo( Infinity() )
return nil
#pragma BEGINDUMP
#include <hbapi.h>
double _HUGE = (1.0/0.0);
HB_FUNC( INFINITY )
{
hb_retndlen( _HUGE, -1, -1 );
}
#pragma ENDDUMP
Thank you for answer, Antonio
code => double __HUGE = (1.0/0.0);
error => divide or mod by zero
1/0 ?
< working sample compile result >
FiveWin for xHarbour 8.05 (MSVC++) May. 2008 xHarbour development power
(c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME/XP/Vista
Compiling...
xHarbour Compiler build 1.1.0 (SimpLex) (Rev. 6138)
Copyright 1999-2008, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'sample.prg' and generating preprocessed output to 'sample.ppo'...
Lines 20, Functions/Procedures 1
Generating C source output to 'sample.c'...
Done.
sample.c
sample.prg(11) : error C2124: divide or mod by zero
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
Creating library sample.lib and object sample.exp
rtl.lib(math.obj) : error LNK2001: unresolved external symbol __HUGE
sample.exe : fatal error LNK1120: 1 unresolved externals
* There are errors
oknbs.
code => double __HUGE = (1.0/0.0);
error => divide or mod by zero
1/0 ?
< working sample compile result >
FiveWin for xHarbour 8.05 (MSVC++) May. 2008 xHarbour development power
(c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME/XP/Vista
Compiling...
xHarbour Compiler build 1.1.0 (SimpLex) (Rev. 6138)
Copyright 1999-2008, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'sample.prg' and generating preprocessed output to 'sample.ppo'...
Lines 20, Functions/Procedures 1
Generating C source output to 'sample.c'...
Done.
sample.c
sample.prg(11) : error C2124: divide or mod by zero
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
Creating library sample.lib and object sample.exp
rtl.lib(math.obj) : error LNK2001: unresolved external symbol __HUGE
sample.exe : fatal error LNK1120: 1 unresolved externals
* There are errors
oknbs.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Oknbs,
Just as a workaround use this:
Just as a workaround use this:
Code: Select all
#pragma BEGINDUMP
double _HUGE = 0;
#pragma ENDDUMP
Thank you for answer, Antonio
My Samples SourceCode
< Batch File >
< Compile Result >
FiveWin for xHarbour 8.05 (MSVC++) May. 2008 xHarbour development power
(c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME/XP/Vista
Compiling...
xHarbour Compiler build 1.1.0 (SimpLex) (Rev. 6138)
Copyright 1999-2008, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'tutor01.prg' and generating preprocessed output to 'tutor01.ppo'...
Lines 14, Functions/Procedures 1
Generating C source output to 'tutor01.c'...
Done.
tutor01.c
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
Creating library tutor01.lib and object tutor01.exp
rtl.lib(math.obj) : error LNK2001: unresolved external symbol __HUGE
tutor01.exe : fatal error LNK1120: 1 unresolved externals
* There are errors
oknbs.
My Samples SourceCode
Code: Select all
function Main()
MsgInfo( "A" )
return nil
#pragma BEGINDUMP
double __HUGE = 0;
#pragma ENDDUMP
< Batch File >
Code: Select all
@ECHO OFF
CLS
ECHO FiveWin for xHarbour 8.05 (MSVC++) May. 2008 xHarbour development power
ECHO (c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME/XP/Vista
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
set hdir=d:\ftdn\xharbourm
set vcdir=d:\VC98
set include=%vcdir%\include;%hdir%\include;%include%
set lib=%vcdir%\lib;%hdir%\lib;%lib%
%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log
@type clip.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT
%vcdir%\bin\cl -TP -W3 -c /GA %1.c
:ENDCOMPILE
IF EXIST %1.rc rc -r -d__FLAT__ %1
echo %1.obj > msvc.tmp
echo ..\lib\Fivehmx.lib ..\lib\FiveHCM.lib >> msvc.tmp
echo %hdir%\lib\rtl.lib >> msvc.tmp
echo %hdir%\lib\vm.lib >> msvc.tmp
echo %hdir%\lib\gtgui.lib >> msvc.tmp
echo %hdir%\lib\lang.lib >> msvc.tmp
echo %hdir%\lib\macro.lib >> msvc.tmp
echo %hdir%\lib\rdd.lib >> msvc.tmp
echo %hdir%\lib\dbfntx.lib >> msvc.tmp
echo %hdir%\lib\dbfcdx.lib >> msvc.tmp
echo %hdir%\lib\dbffpt.lib >> msvc.tmp
echo %hdir%\lib\hbsix.lib >> msvc.tmp
echo %hdir%\lib\debug.lib >> msvc.tmp
echo %hdir%\lib\common.lib >> msvc.tmp
echo %hdir%\lib\pp.lib >> msvc.tmp
echo %hdir%\lib\pcrepos.lib >> msvc.tmp
rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\rddads.lib >> msvc.tmp
rem echo %hdir%\lib\coff\ace32.lib >> msvc.tmp
echo %vcdir%\lib\kernel32.lib >> msvc.tmp
echo %vcdir%\lib\user32.lib >> msvc.tmp
echo %vcdir%\lib\gdi32.lib >> msvc.tmp
echo %vcdir%\lib\winspool.lib >> msvc.tmp
echo %vcdir%\lib\comctl32.lib >> msvc.tmp
echo %vcdir%\lib\comdlg32.lib >> msvc.tmp
echo %vcdir%\lib\advapi32.lib >> msvc.tmp
echo %vcdir%\lib\shell32.lib >> msvc.tmp
echo %vcdir%\lib\ole32.lib >> msvc.tmp
echo %vcdir%\lib\oleaut32.lib >> msvc.tmp
echo %vcdir%\lib\uuid.lib >> msvc.tmp
echo %vcdir%\lib\odbc32.lib >> msvc.tmp
echo %vcdir%\lib\odbccp32.lib >> msvc.tmp
echo %vcdir%\lib\mpr.lib >> msvc.tmp
echo %vcdir%\lib\msvcrt.lib >> msvc.tmp
echo %vcdir%\lib\msimg32.lib >> msvc.tmp
IF EXIST %1.res echo %1.res >> msvc.tmp
%vcdir%\bin\link @msvc.tmp /NODEFAULTLIB:LIBC /nologo /subsystem:windows /force:multiple
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built
%1
GOTO EXIT
ECHO
rem delete temporary files
@del %1.c
@del msvc.tmp
:LINKERROR
ECHO * There are errors
GOTO EXIT
:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensi? PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
FiveWin for xHarbour 8.05 (MSVC++) May. 2008 xHarbour development power
(c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME/XP/Vista
Compiling...
xHarbour Compiler build 1.1.0 (SimpLex) (Rev. 6138)
Copyright 1999-2008, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'tutor01.prg' and generating preprocessed output to 'tutor01.ppo'...
Lines 14, Functions/Procedures 1
Generating C source output to 'tutor01.c'...
Done.
tutor01.c
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in msvcrt.lib(merr.obj); second definition ignored
Creating library tutor01.lib and object tutor01.exp
rtl.lib(math.obj) : error LNK2001: unresolved external symbol __HUGE
tutor01.exe : fatal error LNK1120: 1 unresolved externals
* There are errors
oknbs.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: