FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Fivewin and Microsoft VS2010 VC (visual C)
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Fivewin and Microsoft VS2010 VC (visual C)
Posted: Thu Aug 02, 2012 11:40 AM

Hi,

We need to use Microsoft compiler instead of Borland BCC so as in the future produce 64 bits exe. The first step ;).

Now I just want to produce 34 bits executables with Microsoft compiler.

But here I am confused. There are many versions of that compiler.

What should I use?.

Where I can find it?.

Also, should I have a Harbour built with Microsoft or I can still use Harbour provided for BCC?.

Thank you very much.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Fivewin and MSVC
Posted: Thu Aug 02, 2012 11:57 AM
Hello

lucasdebeltran wrote:What should I use?.

Where I can find it?.


http://forums.fivetechsupport.com/viewtopic.php?f=17&t=21695&p=131641&hilit=msvc#p115366

lucasdebeltran wrote:Also, should I have a Harbour built with Microsoft or I can still use Harbour provided for BCC?.

you should build with Microsoft
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: Fivewin and MSVC
Posted: Thu Aug 02, 2012 12:08 PM

Daniel,

Thank you very much for quick answer!!.

Please, can you include this post in the wiki?. It may help other users.

Also, I will apreciate if you could indicate me a .zip file like http://www.fivetechsoft.com/files/softw ... 4_2010.zip as the install from Microsoft installs a lot of garbage.

Thank you so much. Best regards,

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Fivewin and MSVC
Posted: Sat Aug 04, 2012 09:14 PM

Lucas,

First, several of us have been using Harbour, FWH, and Microsoft VC 2010 for about a year. A lot of work went into the refinement but it all works well now. You can use Visual Studio 2010, or try VC Express ( the Free version ). Now that it has gone RTM, I expect to try builds with Visual Studio 2012 when I get the final build ( hopefully the 15th of this month ). I will report back on that.

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
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: Fivewin and MSVC
Posted: Sun Aug 05, 2012 10:38 AM

Tim,

Thank you for your feedback.

Why did you change into MSVC?.

I did some tests and it seems as fast as BCC 5.82. I can麓t see the diferences.

But MSVC does not have de make utility such in Borland (make -ffwh.mak). What do you use instead?.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Fivewin and MSVC
Posted: Mon Aug 06, 2012 10:18 AM

Lucas,

Microsoft, of course, also provides a make utility named nmake.exe :-)

In FWH makes folder there is an example of its use

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: Fivewin and MSVC
Posted: Mon Aug 06, 2012 12:21 PM

Antonio,

Thanks very much.

I open it but I am afraid it is not for MSVC 2010.

It says "FiveTech Software 2005" and vc98.

Is there any updated version?.

Also, MSVC 2010 supports .rc files make with Workshop?.

Thank you very much and sorry to bother you, but I have to start the path to produce 64 bits.

BTW, Embarcadero is going to launch a 64 bits version very soon of BCC.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Fivewin and MSVC
Posted: Mon Aug 06, 2012 12:56 PM

Lucas,

The idea is to use it as a template. Of course, there are some changes to done for each MSVC version, in example:

go.bat:

c:\"Program Files (x86)\Microsoft Visual Studio 10.0"\VC\bin\nmake -ftest.mak

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Fivewin and MSVC
Posted: Mon Aug 06, 2012 12:58 PM

HBDIR=c:\harbour
FWDIR=c:\fwh
VCDIR=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
SDKDIR=c:\Program Files\Microsoft SDKs\Windows\v7.0A\Include\

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: Fivewin and MSVC
Posted: Mon Aug 06, 2012 02:31 PM

Antonio,

Thanks. I know that I must change paths.

But I think switches should be updated to!!.

And also, maybe some libs are missing.

Please, when you have time it should be very interesting to have the make files updated for MSVC 2010.

Thank you very much.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: Fivewin and MSVC
Posted: Fri Aug 10, 2012 08:07 AM

Up.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Fivewin and MSVC
Posted: Fri Aug 10, 2012 11:47 AM
Here is a complete and tested make file for Microsoft VS2010 working real fine :-)

Please notice that VS2010 does not provide a rc.exe (resources compiler) so we are using the one from VC98 or any other VC version.

Complete example available from here:
http://code.google.com/p/fivewin-contributions/downloads/detail?name=vs2010_make_example.zip&can=2&q=

go.bat
Code (fw): Select all Collapse
c:\"Program Files (x86)\Microsoft Visual Studio 10.0"\VC\bin\nmake -ftest.mak
if errorlevel==0 one.exe

test.mak
Code (fw): Select all Collapse
#Microsoft VS2010 make sample, (c) FiveTech Software 2010

HBDIR=c:\harbour
FWDIR=c:\fwh
VCDIR="c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC"
SDKDIR="c:\Program Files\Microsoft SDKs\Windows\v7.0A"

.SUFFIXES: .prg .c .obj .rc .res

one.exe : one.obj two.obj three.obj one.res
聽 聽echo one.obj two.obj three.obj > msvc.tmp

聽 聽echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp

聽 聽echo $(HBDIR)\lib\vc32\hbrtl.lib 聽 聽>> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hbvm.lib 聽 聽 >> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\gtgui.lib 聽 聽>> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hblang.lib 聽 >> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hbmacro.lib 聽>> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hbrdd.lib 聽 聽>> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\rddntx.lib 聽 >> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\rddcdx.lib 聽 >> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\rddfpt.lib 聽 >> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hbsix.lib 聽 聽>> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hbdebug.lib 聽>> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hbcommon.lib >> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hbpp.lib 聽 聽 >> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hbwin.lib 聽 聽>> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hbcplr.lib 聽 >> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\xhb.lib 聽 聽 聽>> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hbpcre.lib 聽 >> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hbct.lib 聽 聽 >> msvc.tmp
聽 聽echo $(HBDIR)\lib\vc32\hbcpage.lib 聽>> msvc.tmp

聽 聽echo $(SDKDIR)\lib\kernel32.lib 聽>> msvc.tmp
聽 聽echo $(SDKDIR)\lib\user32.lib 聽 聽>> msvc.tmp
聽 聽echo $(SDKDIR)\lib\gdi32.lib 聽 聽 >> msvc.tmp
聽 聽echo $(SDKDIR)\lib\winspool.lib 聽>> msvc.tmp
聽 聽echo $(SDKDIR)\lib\comctl32.lib 聽>> msvc.tmp
聽 聽echo $(SDKDIR)\lib\comdlg32.lib 聽>> msvc.tmp
聽 聽echo $(SDKDIR)\lib\advapi32.lib 聽>> msvc.tmp
聽 聽echo $(SDKDIR)\lib\shell32.lib 聽 >> msvc.tmp
聽 聽echo $(SDKDIR)\lib\ole32.lib 聽 聽 >> msvc.tmp
聽 聽echo $(SDKDIR)\lib\oleaut32.lib 聽>> msvc.tmp
聽 聽echo $(SDKDIR)\lib\uuid.lib 聽 聽 聽>> msvc.tmp
聽 聽echo $(SDKDIR)\lib\odbc32.lib 聽 聽>> msvc.tmp
聽 聽echo $(SDKDIR)\lib\odbccp32.lib 聽>> msvc.tmp
聽 聽echo $(SDKDIR)\lib\iphlpapi.lib 聽>> msvc.tmp
聽 聽echo $(SDKDIR)\lib\mpr.lib 聽 聽 聽 >> msvc.tmp
聽 聽echo $(SDKDIR)\lib\version.lib 聽 >> msvc.tmp
聽 聽echo $(SDKDIR)\lib\wsock32.lib 聽 >> msvc.tmp
聽 聽echo $(SDKDIR)\lib\msimg32.lib 聽 >> msvc.tmp
聽 聽echo $(SDKDIR)\lib\oledlg.lib 聽 聽>> msvc.tmp
聽 聽echo $(SDKDIR)\lib\psapi.lib 聽 聽 >> msvc.tmp
聽 聽echo $(SDKDIR)\lib\gdiplus.lib 聽 >> msvc.tmp
聽 聽echo $(SDKDIR)\lib\winmm.lib 聽 聽 >> msvc.tmp

聽 聽IF EXIST one.res echo one.res >> msvc.tmp

聽 聽SET LIB=$(VCDIR)\lib
聽 聽SET PATH=$(VCDIR)\bin
聽 聽link @msvc.tmp /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:libc > link.log
聽 聽@type link.log
聽 聽@del one.c
聽 聽@del two.c
聽 聽@del three.c
聽 聽@del msvc.tmp

one.obj 聽 : one.c
two.obj 聽 : two.c
three.obj : three.c

one.c 聽 : one.prg
two.c 聽 : two.prg
three.c : three.prg

one.res : one.rc
聽 聽c:\vc98\bin\rc.exe -r -d__FLAT__ one.rc 

.prg.c:
聽 聽$(HBDIR)\bin\harbour $< /n /i$(FWDIR)\include;$(HBDIR)\include

.c.obj:
聽 聽SET PATH=$(VCDIR)\bin
聽 聽cl.exe -c -TP -W3 -I$(HBDIR)\include -I$(SDKDIR)\include -I$(VCDIR)\include $<


regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: Fivewin and Microsoft VS2010 VC (visual C)
Posted: Fri Aug 10, 2012 05:49 PM

Thanks a lot.

Please, can you include in next FWH\makes?. I say it for other and future users.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Fivewin and Microsoft VS2010 VC (visual C)
Posted: Sat Aug 11, 2012 10:15 AM

Lucas,

Included for next build :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion