FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MSVC 2017 Try
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM

Re: MSVC 2017 Try

Posted: Fri Mar 24, 2017 08:24 PM
Hi Antonio,

Nighmare is back.

My next error :

Windows XP : As far as I see, There is not any problem.

Windows 7 : 1) The error is that when I quit from my application (not QUIT command, normally RETURN command in main procedure), after 1-10 second windows says "IcraW.exe has stopped working"

2) Same error occurs when pressing quit button in errordialog if any error occurs.

Windows 10 : 1) There is not any error when exit from my application normally.
2) Same error occurs when pressing quit button in errordialog if any error occurs like w7.



Explanation error when pressing quit button in Error dialog (Errsysw)

First, I have not any change in Errsysw. I used to it with default usage. I have not linked from my mak file.

After this error, I have changed like below and add my mak file.
Code (fw): Select all Collapse
   if lRet == nil .or. ( !LWRunning() .and. lRet )
      SET RESOURCES TO
      ErrorLevel( 1 )
      // Add these lines if using MDI child windows with dialogboxes
      // for n = 1 to Len( GetAllWin() )
      //    if ValType( GetAllWin()[ n ] ) == "O"
      //       GetAllWin()[ n ]:UnLink()
      //    endif
      // next
      ? "BEFORE QUIT"
      QUIT              // must be QUIT !!!
      ? "AFTER QUIT"
   endif


When I press QUIT button. Firstly, it says BEFORE QUIT, then exit programs, then windows says "IcraW.exe has stopped working"

When you read my previous link, thats why gave up MSVC 2015.
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: MSVC 2017 Try

Posted: Sat Mar 25, 2017 04:46 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM

Re: MSVC 2017 Try

Posted: Sat Mar 25, 2017 11:17 AM
Hi Antonio,

Can you explain more? I could not found win-make.exe

or you can build these libs ?

Thanks,


Antonio Linares wrote:Building Harbour 32 bits with VSC2017

go32.bat
Code (fw): Select all Collapse
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
set HB_WITH_OPENSSL=c:\OpenSSL-Win32\include
win-make.exe
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM

Re: MSVC 2017 Try

Posted: Sat Mar 25, 2017 11:19 AM
Hi,

I have tried and same errors.

I am trying to build ssl libs now



Antonio Linares wrote:Hakan,

Please try with this new Harbour for VSC2017:

https://bitbucket.org/fivetech/harbour-xharbour-builds/downloads/Harbour_vsc2017_32bits_20170325.zip
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: MSVC 2017 Try

Posted: Sat Mar 25, 2017 11:54 AM
Here you have win-make.exe

https://github.com/harbour/core

You have to pull Harbour core from its repository
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM

Re: MSVC 2017 Try

Posted: Sat Mar 25, 2017 12:24 PM
:-)

Antonio Linares wrote:Here you have win-make.exe

https://github.com/harbour/core

You have to pull Harbour core from its repository
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM

Re: MSVC 2017 Try

Posted: Sat Mar 25, 2017 03:35 PM
Hi Antonio,

I have downloaded win-make.exe

it needs mak file.

Can you please explain more? Which directory should i copy go32.bat to run.




Horizon wrote::?

Antonio Linares wrote:Here you have win-make.exe

https://github.com/harbour/core

You have to pull Harbour core from its repository
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: MSVC 2017 Try

Posted: Sun Mar 26, 2017 08:18 AM
Hakan,

You have to download Harbour from its repository.

I use TortoiseGit to do it. You may also directly download the repository code from here:
https://github.com/harbour/core/archive/master.zip

Then you can use my provided go.bat to build it. if you want to build a certain lib, then
go to its folder, in example: c:\harbour\contrib\hbssl and run the go.bat from there

go.bat
Code (fw): Select all Collapse
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
set HB_WITH_OPENSSL=c:\OpenSSL-Win32\include
c:\harbour\bin\hbmk2 hbssl
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM

Re: MSVC 2017 Try

Posted: Sun Mar 26, 2017 08:29 AM
Hi Antonio,

I think I have found the problem.

When I compiled my application, Compiler gives this error in both MSVC 2015 and MSVC 2017.

Code (fw): Select all Collapse
hbssl.lib(ssl.obj) : error LNK2019: unresolved external symbol ___iob_func referenced in function _app_stdin


One year ago, you send below code to pass this error.
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=32188&start=15

Code (fw): Select all Collapse
#pragma BEGINDUMP

#include <Windows.h>

extern "C" {
FILE * _iob[] = { stdin, stdout, stderr };

FILE * __iob_func( void )
{
return ( FILE * ) _iob;
}
}

#pragma ENDDUMP


The compiler pass this error with this code. Because of some error, I gave up the migrate to MSVC 2015.

Now, This errors occurs in MSVC 2017 with above code. (to pass this compiler error)

I have erased this code and ALL RUNTIME ERRORS GONE. but compiler error gives same error. but application run good.
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: MSVC 2017 Try

Posted: Sun Mar 26, 2017 08:44 AM

If the compiler is giving an error, how are you able to build the app ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: MSVC 2017 Try

Posted: Sun Mar 26, 2017 10:42 AM

I guess the EXE is created as you are using /FORCE flag

Is the EXE properly working ? If such function gets ever called, the EXE may GPF

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: MSVC 2017 Try

Posted: Sun Mar 26, 2017 06:09 PM
FWH + VSC2017 is working fine here :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM

Re: MSVC 2017 Try

Posted: Sun Mar 26, 2017 07:05 PM

Hi Antonio,

working fine for me too.

It was my mistake. wrong hbssl.lib was added to mak file. it is ok now.

Thank you for all.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: MSVC 2017 Try

Posted: Sun Mar 26, 2017 07:44 PM

very good :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM

Re: MSVC 2017 Try

Posted: Fri Apr 07, 2017 04:35 PM

Good Morning,

I did want to report that I downloaded MS Visual Studio 2017 Community ( full package ) to my laptop. I then used it to build my "solution" created on my main machine with MSVS 2015. I ran the CLEAN utility and did a complete rebuild. It automatically prompted me, and updated the referenced libraries with MSVC.

I am still using the older Harbour builds made with VS 2015. The main reason is that Antonio made a few extra .libs to use with it that were Harbour source, but not in the normal .lib folder.

The program works fine with the older Harbour libraries. There are no build problems, nor are there any operational errors when running the program.

In time, I will update the Harbour libraries. I have retained MSVC 2015 plus the older libs on my production builds for now. I have too many developing features to change that at this moment.

For those considering MSVC plus Harbour, I will encourage you to move in that direction. The 2015 version was continually updated until early 2017 when the new version was released. My clients who use the application built with it find it to be smoother and faster than the copy built with xHarbour ( .com version ), and we are able to support more features ( like taking photos from within the application ). Since Visual Studio Community edition is full featured, and FREE ... it might be worth consideration. Also, it builds great in both 32 bit and 64 bit versions of FWH / Harbour ....

Tim

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