Compile Error using FW17.07, xHarbour, MSVC2015

Compile Error using FW17.07, xHarbour, MSVC2015

Postby teddydjohan » Wed Sep 06, 2017 2:47 am

Dear All,

I am setting up the following environment:
1. xHarbour Build 10205
2. FiveWin 17.07
3. MSVC 2015

I have modified the FiveWin\samples\buildxm.bat as follow:
Code: Select all  Expand view  RUN

@ECHO OFF
CLS
ECHO

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for xHarbour 17.07 (MSVC++) July 2017    xHarbour development

power ³Ü
ECHO ³ (c) FiveTech, 1993-2017    for Microsoft Windows

9x/NT/2000/ME/XP/Vista/7/8 ³Û
ECHO

ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

Û
ECHO ÿ

ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

set hdir=D:\xhb_fw_msvc15\xhb10205
set vcdir=D:\xhb_fw_msvc15\vc2015
set include=%vcdir%\include;%hdir%\include;%include%
set lib=%vcdir%\lib;%hdir%\vc\lib;%lib%

%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log 2>

warnings.log
@type clip.log
@type warnings.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT

%vcdir%\bin\cl -TP -W3 -c /GA %1.c
:ENDCOMPILE

IF EXIST %1.rc %vcdir%\sdk\bin\rc -r -d__FLAT__ %1

echo %1.obj  > msvc.tmp

echo D:\xhb_fw_msvc15\fw1707\lib\Fivehmx.lib  >> msvc.tmp
echo D:\xhb_fw_msvc15\fw1707\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 echo c:\harbour\lib\vc98\png.lib  >> msvc.tmp
rem echo c:\harbour\lib\vc98\hbzlib.lib  >> msvc.tmp

rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\vc\rddads.lib >> msvc.tmp
rem echo %hdir%\lib\vc\ace32.lib >> msvc.tmp

rem echo %vcdir%\lib\msvcrt.lib  >> msvc.tmp
echo %vcdir%\sdk\lib\kernel32.lib  >> msvc.tmp
echo %vcdir%\sdk\lib\user32.lib    >> msvc.tmp
echo %vcdir%\sdk\lib\gdi32.lib     >> msvc.tmp
echo %vcdir%\sdk\lib\winspool.lib  >> msvc.tmp
echo %vcdir%\sdk\lib\comctl32.lib  >> msvc.tmp
echo %vcdir%\sdk\lib\comdlg32.lib  >> msvc.tmp
echo %vcdir%\sdk\lib\advapi32.lib  >> msvc.tmp
echo %vcdir%\sdk\lib\shell32.lib   >> msvc.tmp
echo %vcdir%\sdk\lib\ole32.lib     >> msvc.tmp
echo %vcdir%\sdk\lib\oleaut32.lib  >> msvc.tmp
echo %vcdir%\sdk\lib\uuid.lib      >> msvc.tmp
echo %vcdir%\sdk\lib\odbc32.lib    >> msvc.tmp
echo %vcdir%\sdk\lib\odbccp32.lib  >> msvc.tmp
echo %vcdir%\sdk\lib\mpr.lib       >> msvc.tmp
echo %vcdir%\sdk\lib\msimg32.lib   >> msvc.tmp
echo %vcdir%\sdk\lib\oledlg.lib    >> msvc.tmp
echo %vcdir%\sdk\lib\psapi.lib    >> msvc.tmp
echo %vcdir%\sdk\lib\version.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ón PRG
ECHO                                {-- Don't specify .PRG extension
GOTO EXIT

:NOEXIST
ECHO The specified PRG %1 does not exist

:EXIT


I use fivehmx.lib and fivehcm.lib because this is FiveWin for xHarbour with MSVC 2015.

However, I get a whole bunch of errors. This is just an excerpt of the error:
Code: Select all  Expand view  RUN

FiveHCM.lib(GDIPLUS.obj) : error LNK2019: símbolo externo _GdipBitmapSetPixel@16
 sin resolver al que se hace referencia en la función "public: enum Gdiplus::Sta
tus __thiscall Gdiplus::Bitmap::SetPixel(int,int,class Gdiplus::Color const &)"

(?SetPixel@Bitmap@Gdiplus@@QAE?AW4Status@2@HHABVColor@2@@Z)
FiveHCM.lib(GDIPLUS.obj) : error LNK2019: símbolo externo _GdipCreateHICONFromBi
tmap@8 sin resolver al que se hace referencia en la función "public: enum Gdiplu
s::Status __thiscall Gdiplus::Bitmap::GetHICON(struct HICON__ * *)"
(?GetHICON@B
itmap@Gdiplus@@QAE?AW4Status@2@PAPAUHICON__@@@Z)
FiveHCM.lib(GDIPLUS.obj) : error LNK2019: símbolo externo _GdipDisposeImageAttri
butes@4 sin resolver al que se hace referencia en la función "public: __thiscall
 Gdiplus::ImageAttributes::~ImageAttributes(void)"
(??1ImageAttributes@Gdiplus@@
QAE@XZ)
FiveHCM.lib(GDIPLUS.obj) : error LNK2019: símbolo externo _GdipSetInterpolationM
ode@8 sin resolver al que se hace referencia en la función "public: enum Gdiplus
::Status __thiscall Gdiplus::Graphics::SetInterpolationMode(enum Gdiplus::Interp
olationMode)"
(?SetInterpolationMode@Graphics@Gdiplus@@QAE?AW4Status@2@W4Interpo
lationMode@2@@Z)
FiveHCM.lib(GDIPLUS.obj) : error LNK2019: símbolo externo _GdipTranslateWorldTra
nsform@16 sin resolver al que se hace referencia en la función "public: enum Gdi
plus::Status __thiscall Gdiplus::Graphics::TranslateTransform(float,float,enum G
diplus::MatrixOrder)"
(?TranslateTransform@Graphics@Gdiplus@@QAE?AW4Status@2@MMW
4MatrixOrder@2@@Z)
FiveHCM.lib(GDIPLUS.obj) : error LNK2019: símbolo externo _GdipScaleWorldTransfo
rm@16 sin resolver al que se hace referencia en la función "public: enum Gdiplus
::Status __thiscall Gdiplus::Graphics::ScaleTransform(float,float,enum Gdiplus::
MatrixOrder)"
(?ScaleTransform@Graphics@Gdiplus@@QAE?AW4Status@2@MMW4MatrixOrder
@2@@Z)
FiveHCM.lib(GDIPLUS.obj) : error LNK2019: símbolo externo _GdipRotateWorldTransf
orm@12 sin resolver al que se hace referencia en la función "public: enum Gdiplu
s::Status __thiscall Gdiplus::Graphics::RotateTransform(float,enum Gdiplus::Matr
ixOrder)"
(?RotateTransform@Graphics@Gdiplus@@QAE?AW4Status@2@MW4MatrixOrder@2@@
Z)
FiveHCM.lib(GDIPLUS.obj) : error LNK2019: símbolo externo _GdipCreateMetafileFro
mStream@8 sin resolver al que se hace referencia en la función "public: __thisca
ll Gdiplus::Metafile::Metafile(struct IStream *)"
(??0Metafile@Gdiplus@@QAE@PAUI
Stream@@@Z)
FiveHCM.lib(GDIPLUS.obj) : error LNK2019: símbolo externo _GdipBitmapSetResoluti
on@12 sin resolver al que se hace referencia en la función "public: enum Gdiplus
::Status __thiscall Gdiplus::Bitmap::SetResolution(float,float)"
(?SetResolution
@Bitmap@Gdiplus@@QAE?AW4Status@2@MM@Z)
FiveHCM.lib(GDIPLUS.obj) : error LNK2019: símbolo externo _GdipSetTextureWrapMod
e@8 sin resolver al que se hace referencia en la función "public: enum Gdiplus::
Status __thiscall Gdiplus::TextureBrush::SetWrapMode(enum Gdiplus::WrapMode)"
(?
SetWrapMode@TextureBrush@Gdiplus@@QAE?AW4Status@2@W4WrapMode@2@@Z)
tutor01.exe : fatal error LNK1120: 167 externos sin resolver
* There are errors
 


Why is the error in Spanish? Can it be changed to English?

Thanks.
teddydjohan
 
Posts: 18
Joined: Wed Aug 16, 2017 5:38 am

Re: Compile Error using FW17.07, xHarbour, MSVC2015

Postby Antonio Linares » Wed Sep 06, 2017 8:04 am

You have to link gdiplus.lib from MSVC

Those errors come from the Microsoft linker. Surely you may have installed an spanish version instead of the english one,
or it may be a setting of MSVC
regards, saludos

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

Re: Compile Error using FW17.07, xHarbour, MSVC2015

Postby teddydjohan » Wed Sep 06, 2017 8:30 am

Antonio Linares wrote:You have to link gdiplus.lib from MSVC

Those errors come from the Microsoft linker. Surely you may have installed an spanish version instead of the english one,
or it may be a setting of MSVC


Already link to gdiplus.lib but now I get this error.

Code: Select all  Expand view  RUN
┌────────────────────────────────────────────────────────────────────────────┐
│ FiveWin for xHarbour 17.07 (MSVC++) July 2017    xHarbour development power │▄

(c) FiveTech, 1993-2017    for Microsoft Windows 9x/NT/2000/ME/XP/Vista/7/8 │█

└────────────────────────────────────────────────────────────────────────────┘█
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Compiling...
xHarbour 1.2.3 Intl. (SimpLex) (Build 20170902)
Copyright 1999-2017, 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.
Lines 13, Functions/Procedures 1, pCodes 14
Compilador de optimización de C/C++ de Microsoft (R) versión 19.00.24215.1 para
x86
(C) Microsoft Corporation. Reservados todos los derechos.

tutor01.c
Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
Copyright (C) Microsoft Corporation.  All rights reserved.

libucrt.lib(pow.obj) : warning LNK4006: __CIpow ya se definió en Fivehmx.lib(HAR
BOUR.obj); segunda definición omitida
Fivehmx.lib(VALBLANK.obj) : error LNK2001: símbolo externo _HB_FUN_REMRIGHT sin
resolver
Fivehmx.lib(PDMENU.obj) : error LNK2001: símbolo externo _HB_FUN_NUMAT sin resol
ver
Fivehmx.lib(MENUITEM.obj) : error LNK2001: símbolo externo _HB_FUN_NUMAT sin res
olver
Fivehmx.lib(FONT.obj) : error LNK2001: símbolo externo _HB_FUN_EXENAME sin resol
ver
Fivehmx.lib(IMGTXTIO.obj) : error LNK2001: símbolo externo _HB_FUN_EXENAME sin r
esolver
Fivehmx.lib(ADOFUNCS.obj) : error LNK2001: símbolo externo _HB_FUN_EXENAME sin r
esolver
Fivehmx.lib(IMGTXTIO.obj) : error LNK2001: símbolo externo _HB_FUN_CEILING sin r
esolver
Fivehmx.lib(XBROWSE.obj) : error LNK2001: símbolo externo _HB_FUN_CEILING sin re
solver
Fivehmx.lib(IMGTXTIO.obj) : error LNK2001: símbolo externo _HB_FUN_CHARONE sin r
esolver
Fivehmx.lib(XBROWSE.obj) : error LNK2001: símbolo externo _HB_FUN_CHARONE sin re
solver
Fivehmx.lib(ADOFUNCS.obj) : error LNK2001: símbolo externo _HB_FUN_CHARONE sin r
esolver
Fivehmx.lib(ADOFUNCS.obj) : error LNK2001: símbolo externo _HB_FUN_AFTERATNUM si
n resolver
Fivehmx.lib(DATAROW.obj) : error LNK2001: símbolo externo _HB_FUN_AFTERATNUM sin
 resolver
Fivehmx.lib(PGSUPORT.obj) : error LNK2001: símbolo externo _HB_FUN_AFTERATNUM si
n resolver
Fivehmx.lib(IMGTXTIO.obj) : error LNK2001: símbolo externo _HB_FUN_AFTERATNUM si
teddydjohan
 
Posts: 18
Joined: Wed Aug 16, 2017 5:38 am

Re: Compile Error using FW17.07, xHarbour, MSVC2015

Postby Antonio Linares » Wed Sep 06, 2017 9:13 am

You have to link xharbour ct.lib

To find a library is very easy:

1. Go to the folder where the xHarbour libraries are

2. Use a tool to search for a text in all the files. I use Total Commander for this

:-)
regards, saludos

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

Re: Compile Error using FW17.07, xHarbour, MSVC2015

Postby teddydjohan » Wed Sep 06, 2017 9:44 am

Antonio Linares wrote:You have to link xharbour ct.lib

To find a library is very easy:

1. Go to the folder where the xHarbour libraries are

2. Use a tool to search for a text in all the files. I use Total Commander for this

:-)


Code: Select all  Expand view  RUN
libucrt.lib(pow.obj) : warning LNK4006: __CIpow ya se definió en Fivehmx.lib(HAR
BOUR.obj); segunda definición omitida
Fivehmx.lib(VALBLANK.obj) : error LNK2001: símbolo externo _HB_FUN_REMRIGHT sin
resolver
 


How do know which lib to include just from the error message? What do you actually search for?
For example: the error from above, what do you search for? valblank.obj or fun_remright?

Now, I get the following error after I link the ct.lib.
Code: Select all  Expand view  RUN
xHarbour 1.2.3 Intl. (SimpLex) (Build 20170902)
Copyright 1999-2017, 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.

Lines 13, Functions/Procedures 1, pCodes 14
tutor01.c
Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385

Copyright (C) Microsoft Corporation.  All rights reserved.


Fivehmx.lib(OLEFUNCS.obj) : error LNK2001: símbolo externo _HB_FUN_HB_UNZIPFILE sin resolver
Fivehmx.lib(OLEFUNCS.obj) : error LNK2001: símbolo externo _HB_FUN_HB_GETFILESINZIP sin resolver
FiveHCM.lib(KEYBRD.obj) : error LNK2019: símbolo externo _SendInput sin resolver al que se hace referencia en la función _HB_FUN_SENDKEY
FiveHCM.lib(MENUDRAW.obj) : error LNK2019: símbolo externo _GetMenuInfo sin resolver al que se hace referencia en la función _HB_FUN_HBMPBACK
FiveHCM.lib(MENUDRAW.obj) : error LNK2019: símbolo externo _SetMenuInfo sin resolver al que se hace referencia en la función _hSetbmpback
FiveHCM.lib(MENUDRAW.obj) : error LNK2019: símbolo externo _GetWindowLongPtr sin resolver al que se hace referencia en la función _HB_FUN_CCOLORMENU
FiveHCM.lib(MENUDRAW.obj) : error LNK2019: símbolo externo _GetMenuBarInfo sin resolver al que se hace referencia en la función _HB_FUN_MINFOMIMENU
FiveHCM.lib(NONCLIENT.obj) : error LNK2019: símbolo externo _GetComboBoxInfo sin resolver al que se hace referencia en la función _HB_FUN_HWNDCOMBO
FiveHCM.lib(NONCLIENT.obj) : error LNK2019: símbolo externo _GetListBoxInfo sin resolver al que se hace referencia en la función _HB_FUN_NGETLISTBOXINFO
tutor01.exe : fatal error LNK1120: 9 externos sin resolver
 
teddydjohan
 
Posts: 18
Joined: Wed Aug 16, 2017 5:38 am

Re: Compile Error using FW17.07, xHarbour, MSVC2015

Postby Enrico Maria Giordano » Wed Sep 06, 2017 12:43 pm

teddydjohan wrote:How do know which lib to include just from the error message? What do you actually search for?
For example: the error from above, what do you search for? valblank.obj or fun_remright?


Search your hard disk for all the *.lib files containing the word REMRIGHT (or VALBLANK). Don't add .OBJ or FUN_ or you will find nothing.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8719
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile Error using FW17.07, xHarbour, MSVC2015

Postby Antonio Linares » Wed Sep 06, 2017 2:14 pm

regards, saludos

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

Re: Compile Error using FW17.07, xHarbour, MSVC2015

Postby teddydjohan » Thu Sep 07, 2017 1:30 am

Antonio Linares wrote:Teddy,

Please link this library too:

https://bitbucket.org/fivetech/fivewin-contributions/downloads/xfw.lib


Antonio,

I downloaded the xfw.lib and linked it. Now, it is down to 5 errors. What library files do I need to link now? Thank you.

Code: Select all  Expand view  RUN
xHarbour 1.2.3 Intl. (SimpLex) (Build 20170902)
Copyright 1999-2017, 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.

Lines 13, Functions/Procedures 1, pCodes 14
tutor01.c
Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385

Copyright (C) Microsoft Corporation.  All rights reserved.


Fivehmx.lib(OLEFUNCS.obj) : error LNK2001: símbolo externo _HB_FUN_HB_UNZIPFILE sin resolver
Fivehmx.lib(OLEFUNCS.obj) : error LNK2001: símbolo externo _HB_FUN_HB_GETFILESINZIP sin resolver
FiveHCM.lib(KEYBRD.obj) : error LNK2019: símbolo externo _SendInput sin resolver al que se hace referencia en la función _HB_FUN_SENDKEY
FiveHCM.lib(NONCLIENT.obj) : error LNK2019: símbolo externo _GetComboBoxInfo sin resolver al que se hace referencia en la función _HB_FUN_HWNDCOMBO
FiveHCM.lib(NONCLIENT.obj) : error LNK2019: símbolo externo _GetListBoxInfo sin resolver al que se hace referencia en la función _HB_FUN_NGETLISTBOXINFO
tutor01.exe : fatal error LNK1120: 5 externos sin resolver
teddydjohan
 
Posts: 18
Joined: Wed Aug 16, 2017 5:38 am

Re: Compile Error using FW17.07, xHarbour, MSVC2015

Postby Antonio Linares » Thu Sep 07, 2017 6:42 am

regards, saludos

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

Re: Compile Error using FW17.07, xHarbour, MSVC2015

Postby teddydjohan » Thu Sep 07, 2017 8:22 am



Antonio,

Downloaded and linked the above library files but still error out as follow:

Code: Select all  Expand view  RUN
xHarbour 1.2.3 Intl. (SimpLex) (Build 20170902)
Copyright 1999-2017, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'tutor03.prg' and generating preprocessed output to 'tutor03.ppo'...

Generating C source output to 'tutor03.c'...
Done.

Lines 26, Functions/Procedures 1, pCodes 120
tutor03.c
FiveHCM.lib(NONCLIENT.obj) : error LNK2019: símbolo externo _GetComboBoxInfo sin resolver al que se hace referencia en la función _HB_FUN_HWNDCOMBO
FiveHCM.lib(NONCLIENT.obj) : error LNK2019: símbolo externo _GetListBoxInfo sin resolver al que se hace referencia en la función _HB_FUN_NGETLISTBOXINFO
tutor03.exe : fatal error LNK1120: 2 externos sin resolver


I am getting confused. Those additional library files that you asked me to download, they are not part of FiveWin or XHarbour binary package? How can I know which addtional library files I need to search and add to the my FiveWin or xHarbour package?

I am currently using the binary packages I downloaded from Mel Smith in whosaway.com. Those files are:
- xhb10205_msvc15.zip
- vc2015.zip

and I am currently using FiveWin 17.07

I tested out the xhb10205_bcc58 version from Mel Smith and it compile and builds the samples program successfully. Seems like it is easier to use the BCC version.


Guys,

Any info for me to resolve this issue? Thanks.
teddydjohan
 
Posts: 18
Joined: Wed Aug 16, 2017 5:38 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 34 guests