Working With Visual Studio 2015 and FWH / Harbour

Working With Visual Studio 2015 and FWH / Harbour

Postby TimStone » Wed May 04, 2016 4:40 pm

Microsoft has released it's latest edition of Visual Studio, and the Community Edition 2015 is free to developers. This is not some cut down limited edition, but a full featured IDE which uses all of the languages available for Windows, Linux, iOS, and Android development. ( You read that correctly ). It also incorporates the tools we, as FWH developers, need to build strong applications.

Though we can use various .mak and .bat files to build these applications just using the MSVC C compiler and linker, we can also use the IDE. I am starting this thread and will go through how to do a setup VS 2015 itself. The advantage here is simple. Use the IDE for everything, and do your builds quickly. I actually edit my files in Ultra Edit Studio, but have VS 2015 open and hit one button to do the build for my tests. It's very fast, and errors of construction are easily displayed.

This topic was discussed over the past few years in this forum. However, it was across multiple threads. I'll share what I have found to work well over the next few days, and ask that anyone else using the IDE feel free to include their observations as well.

PLEASE LIMIT THIS THREAD TO THE IDE. I know there are alternative methods of assembly, but those are all discussed in other threads.

I know some will ask "Why use the Microsoft compiler when we have Borland / Pelles / Others ?" My response:
1) It is FREE
2) It is current
3) Microsoft is on a path to bring together connectivity to ALL major OSs. We will be getting more functionality each month.
It is not your only option, but if you want to explore it, your only cost is time.

To get started, you will want the free Visual Studio 2015 Community Edition. Download it for free from here:
https://www.visualstudio.com/en-us/visual-studio-homepage-vs.aspx

You will want FWH 16.03 or newer, and your libraries will be FiveH32.lib and FiveHC32.lib

You will need Antonio's latest Harbour build from this download site:
https://bitbucket.org/fivetech/harbour-xharbour-builds/downloads/harbour_VSC2015_32bits_20160330.zip

Tim
Last edited by TimStone on Wed May 04, 2016 8:14 pm, edited 2 times 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: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby Antonio Linares » Wed May 04, 2016 4:55 pm

Tim,

thanks for this very interesting thread.

I am using the Visual Studio Community 2015 (vsc2015) IDE and the low level integrated debugger lately.

Thanks to its great debugger I have been able to implement the Toasts support in FWH 16.04 :-)

Its a great tool and it is free. What else ? :-)
regards, saludos

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

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby norberto » Wed May 04, 2016 5:01 pm

TIm, nice, i try some time ago, i will try again, Works with fwh1602? or only 1603?

thanks
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby TimStone » Wed May 04, 2016 6:33 pm

2015 requires 16.03 and above because Antonio started building the MS C libraries with it at that point.
Last edited by TimStone on Wed May 04, 2016 8:15 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: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby Antonio Linares » Wed May 04, 2016 7:16 pm

regards, saludos

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

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby TimStone » Wed May 04, 2016 9:05 pm

STEP 2: Setting up and building a program.

Now that you have gathered all of your files onto your computer, you will need to setup and install a new "solution". Antonio has detailed this beautifully, with screen shots, in the following thread for VS 2013:

http://forums.fivetechsupport.com/viewtopic.php?f=17&t=28723&start=0

Here are some issues for Community 2015, and from some recent testing:

1) Antonio suggests a folder for libraries. I found that the IDE organizes those libs alphabetically, and does not allow you to order them. So, I went into the System Properties, selected Linker, and for input, I entered them as Dependencies. The only exception was that I put FiveH32.lib and FiveHC32.lib into the source folder as suggested. By doing it this way, I can actually put the .lib files into the list in which I want the linker to read them, and certain routines ( ie. Harbour TIP which has 5 files that must be linked in a specific order ) actually work.

2) In step 16, you declare /NODEFAULTLIB:MSVCRT You may also need to do the same for MSVCRTD

3) In the same step, you are told to add the windows libraries from a path specified as Windows SDKs. Now the path for those files needs to be:
c:\Program Files (x86)\Windows Kits\8.1\bin\x86
Follow the same procedure but get the files from this new location for VS 2015.

4) Finally, VS IDE has a decent editor if you want to use it. Highlighting would be nice, and Antonio has provided a guide for setting that up in this thread:
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=28600

A lot of time has been spent by Five Tech staff to bring this all together. I appreciate all they have done. I hope others will step in here and also start working with this and provide their input.

Yes, you can build FWH 64 bit applications also with the IDE.
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: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby mariordzmej » Tue May 17, 2016 5:09 pm

I have succesfully built a project using Visual Studio 2015 + FWH1604 + Harbour, after a minor modifications to the instructions provided here (for example the windows libraries are in "C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86").

It is working just fine so far, I have been using MSVC 2013+Fivewin1602+harbour and changing to the new versión of MSVC2015 was easy.

Thanks to all the team who made this possible and I would like to encourage other members of the community to give this IDE a try.

Best regards
mariordzmej
 
Posts: 13
Joined: Thu Mar 10, 2016 10:51 pm

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby Antonio Linares » Tue May 17, 2016 5:55 pm

Mario,

Many thanks for your feedback.

If you follow these instructions:
viewtopic.php?f=17&t=32390
then you will have syntax coloring for PRGs and CHs too
regards, saludos

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

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby TimStone » Tue May 17, 2016 8:53 pm

Antonio,

Recently you mentioned you had the Visual Studio Resource Editor working with projects. I tried to open it up on my .rc file and it tells me one of the default headers has a symbol too large.

What did you do to setup yours ?

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
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby Antonio Linares » Tue May 17, 2016 9:24 pm

Tim,

Try to remove windows.h from the resource file
regards, saludos

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

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby TimStone » Tue May 17, 2016 10:11 pm

THE RESOURCE EDITOR

Most of my resources are in an .rc file that was started in the old days with Borland controls but has evolved away from them over the years. Now that I have my application building cleanly using Visual Studio 2015 Community, and also have the editor working with highlighting, it would sure be nice to get the resource editor to work.

The problem is with the INCLUDE .h files. I currently have 3 files that I use:
windows.h
commctrl.h
richedit.h

If I try to open the .rc file in the IDE resource editor, it rebels against prsht.h which is linked in using commctrl.h Since I only use 2 defines from that file, I easily put them in the .rc file and eliminate it. Then I can actually load the .rc file.

The problem comes when making any change. Once that is done, Visual Studio wants to modify the .rc structure before saving it. Most of it is fine, but the problem is that it creates a new include file, resource.h, and eliminates the others. As a result, the file is unable to identify some standard definitions, ie. WS_POPUP, and then it fails to save, and the application cannot be built.

Has anyone else worked with the VS Resource editor ? What files do we need to include ( .h ) so it will be useable, and able to compile properly >

Thanks for your insights.

Tim
Last edited by TimStone on Wed May 18, 2016 8:43 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: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby mariordzmej » Wed May 18, 2016 1:46 pm

Antonio, I followed the instruction on the other thread and I got the colors working.

Thanks for the tip.
mariordzmej
 
Posts: 13
Joined: Thu Mar 10, 2016 10:51 pm

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby TimStone » Wed May 18, 2016 8:44 pm

Please see my modified item up two messages on this thread.
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: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby vmarimon » Wed Jun 01, 2016 1:30 pm

Hi to all, i get many errors something like this:

Code: Select all  Expand view
Gravedad    Código Descripción    Proyecto    Archivo Línea  Estado de supresión
Error   LNK2019 símbolo externo _GdipAlloc@4 sin resolver al que se hace referencia en la función "public: static void * __cdecl Gdiplus::GdiplusBase::operator new(unsigned int)" (??2GdiplusBase@Gdiplus@@SAPAXI@Z) Win32Project1   C:\Users\vmarimon\Documents\Visual Studio 2015\Projects\Win32Project1\Win32Project1\FiveHC32.lib(GDIPFWH.obj)   1   
 



Maybe any lib more to add to project?

Many Thx.

P.D: FiveWin 1604
vmarimon
 
Posts: 8
Joined: Thu Feb 01, 2007 11:59 am

Re: Working With Visual Studio 2015 and FWH / Harbour

Postby vmarimon » Wed Jun 01, 2016 2:08 pm

I autoanswer-me-.....


gdi32.dll and gdiplus.dll needs to add to project....

runs perfectly on fivewin 1604+VS2015.
vmarimon
 
Posts: 8
Joined: Thu Feb 01, 2007 11:59 am

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 96 guests