Makefile for FWH64 and Visual Studio 2013 with multiple PRGs

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Makefile for FWH64 and Visual Studio 2013 with multiple PRGs

Post by Antonio Linares »

go.bat

Code: Select all

@set oldpath=%path%
@set oldinclude=%include%
@set oldlib=%lib%
@set oldlibpath=%libpath%
if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" call "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
c:\"Program Files (x86)\Microsoft Visual Studio 12.0"\VC\bin\nmake -ftest.mak
@set path=%oldpath%
@set include=%oldinclude%
@set lib=%oldlib%
@set libpath=%oldlibpath%
@set oldpath=""
@set oldinclude=""
@set oldlib=
@set oldlibpath=
if errorlevel==0 one.exe
 
test.mak

Code: Select all

#Microsoft VS2013 make sample, (c) FiveTech Software 2014

HBDIR=c:\harbour
FWDIR=c:\fwteam
VCDIR="c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC"
SDKDIR="c:\Program Files (x86)\Windows Kits\8.1"

.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\FiveH64.lib $(FWDIR)\lib\FiveHC64.lib >> msvc.tmp

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

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

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

   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:
   cl.exe -c -TC -W3 -I$(HBDIR)\include -I$(SDKDIR)\include -I$(VCDIR)\include $<
 
uno.prg

Code: Select all

#include "FiveWin.ch"

function Main()

   Two()
   
   Three()

return nil
 
two.prg

Code: Select all

#include "FiveWin.ch"

function Two()

   local oWnd

   DEFINE WINDOW oWnd TITLE "FWH64 and Harbour 64 bits for Microsoft Visual Studio 2013"

   ACTIVATE WINDOW oWnd

return nil
three.prg

Code: Select all

function Three()

   MsgInfo( "three.prg also linked" )

return nil
one.rc

Code: Select all

// place your resources here

1 ICON favorite.ico
You can download it from here:
https://bitbucket.org/fivetech/fivewin- ... 3_make.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

Re: Makefile for FWH64 and Visual Studio 2013 with multiple PRGs

Post by Horizon »

Hi Antonio,

Is there any advantage migrate to vs2013 from vs2010?

Thanks.
Regards,

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Makefile for FWH64 and Visual Studio 2013 with multiple PRGs

Post by Antonio Linares »

Hakan,

My advise is to use the most recent Visual Studio (express) version.

The level of compatibility with current Windows versions and upgrades, bug fixes, etc. is always much better using the most recent version of Visual Studio. Tha latest one I have been using is Visual Studio 2012, but I have already installed Visual Studio 2013, so from now on, I will be using it.

And it is free and made by Microsoft :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: Makefile for FWH64 and Visual Studio 2013 with multiple PRGs

Post by Richard Chidiak »

Antonio

Just curiosity,

Can an application built with visual studio 2013 run on xp ?

I know Microsoft has stopped support for Xp but we still ahve a lot of customers using it.

Is the application mandatory 64 bits or can we still build 32 bits ?

Thanks for help
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Makefile for FWH64 and Visual Studio 2013 with multiple PRGs

Post by Antonio Linares »

Richard,

32 bits apps can be used with no problem at all.

64 bits apps take more advantage of the operating system features (i.e. large amounts of memory management).

I have not tested Visual Studio 2013 apps on XP but they should work fine.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply