How to build 64bit Lib

How to build 64bit Lib

Postby richard-service » Sun Jan 04, 2015 11:45 am

Hi
I have some 3rd LIB(include source code), so I have make 32 bit LIB that use BCC582.
Now, I want to change to 64 bit. So I need to rebuild 32 bit LIB( BCC582 ) to 64 bit LIB( VS2013 )
Thanks a lot.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: How to build 64bit Lib

Postby Antonio Linares » Sun Jan 04, 2015 11:58 am

Richard,

"$(VCINSTALLDIR)"bin\x86_amd64\Lib Your64lib.lib /OUT:Your64lib.lib your64obj.obj
regards, saludos

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

Re: How to build 64bit Lib

Postby richard-service » Sun Jan 04, 2015 12:10 pm

Antonio Linares wrote:Richard,

"$(VCINSTALLDIR)"bin\x86_amd64\Lib Your64lib.lib /OUT:Your64lib.lib your64obj.obj


Antonio,

Could you build a make file for build 64 bit LIB?
3rd have some PRG/C type files.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: How to build 64bit Lib

Postby Antonio Linares » Sun Jan 04, 2015 12:12 pm

Richard,

I have to go now, but later I will prepare it :-)
regards, saludos

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

Re: How to build 64bit Lib

Postby Verhoven » Sun Jan 04, 2015 12:24 pm

I'm tring to convert my software from 32 bits to 64 bits, and still have some issues, but we have write a .bat to build the Hernan's browse lib for 64 bits.
This are the instructions we use and I think my be usefull to you:
Code: Select all  Expand view
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FWH 64 for Harbour 14.02 (MSVC++) Feb.2014       Harbour development power ³Ü
ECHO ³         TWBROWSE                                                           ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

del OK.log

set NAMELIB=TWBRWX64_H.LIB

set FWDIR=C:\fwh64
set HBDIR=C:\harbour

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
REM if "%FWDIR%" == "" set FWDIR=.\..
if "%FWDIR%" == "" set FWDIR=C:\FWH64
if "%HBDIR%" == "" set HBDIR=c:\harbour

ECHO Compilando...

set hdir=%HBDIR%
REM set hdirl=%hdir%\lib\vc64
set hdirl=%hdir%\lib

REM  ----------------------------------------------------------------
REM  --------------  wbrwline.C                      ----------------
REM  ----------------------------------------------------------------

SET CARPETA=.\sourceh\function\twbrowse
SET NAME=wbrwline

cl -D__FLAT__ -D__HARBOUR__ -TC -W3 -O2 -c -I%hdir%\include %CARPETA%\%NAME%.c > comp.log
:ENDCOMPILE

IF ERRORLEVEL 1 GOTO END
ECHO ........... %NAME% Compilada


REM  ----------------------------------------------------------------
REM  --------------  tmultise.PRG                    ----------------
REM  ----------------------------------------------------------------

SET CARPETA=.\sourceh\classes\twbrowse
SET NAME=tmultise
 
%hdir%\bin\harbour %CARPETA%\%NAME%.PRG /n /i%fwdir%\include;%hdir%\include /w /p /d__64__ %2 %3 > comp.log 2> warnings.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
@type warnings.log

cl -TC -W3 -O2 -c -I%hdir%\include %NAME%.c  > comp.log
:ENDCOMPILE

ECHO ........... %NAME% Compilada


REM  ----------------------------------------------------------------
REM  --------------  wbrowse.PRG                     ----------------
REM  ----------------------------------------------------------------

SET NAME=wbrowse
 
%hdir%\bin\harbour %CARPETA%\%NAME%.PRG /n /i%fwdir%\include;%hdir%\include /w /p /d__64__ %2 %3 > comp.log 2> warnings.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
@type warnings.log

cl -TC -W3 -O2 -c -I%hdir%\include %NAME%.c  > comp.log
:ENDCOMPILE

ECHO ........... %NAME% Compilada

REM  ----------------------------------------------------------------
REM  --------------  ENLAZA LA LIBRERIA              ----------------
REM  ----------------------------------------------------------------

echo wbrowse.obj  > msvc.tmp
echo tmultise.obj  >> msvc.tmp
echo wbrwline.obj  >> msvc.tmp

LIB /OUT:.\LIB\%NAMELIB% @msvc.tmp > LIB_ERROR.LOG

IF ERRORLEVEL 1 GOTO LIBERROR
ECHO ................................Lib %NAMELIB% enlazada.

DEL *.OBJ >> %NAMELIB%.log
DEL *.BAK >> %NAMELIB%.log
DEL *.BAK >> %NAMELIB%.log
DEL %NAMELIB%.log >> OK.log

:LIBERROR
@type LIB_ERROR.LOG


GOTO EXIT
ECHO

:COMPILEERROR
@type comp.log
ECHO * Compiling errors *
GOTO EXIT

:LINKERROR
@type LINK_ERRORS.LOG
ECHO * Linking errors *
GOTO EXIT

:EXIT
rem delete temporary files
del wbrowse.c
del tmultise.c
del wbrwline.c
del wbrowse.obj
del tmultise.obj
del wbrwline.obj
del msvc.tmp
del warnings.log
del LIB_ERROR.LOG
del comp.LOG

SET PATH=%OLDPATH%
SET INCLUDE=%OLDINCLUDE%
SET LIB=%OLDLIB%
SET OLDPATH=
SET OLDINCLUDE=
SET OLDLIB=
SET RUTALIB=
SET NAMELIB=


 
Verhoven
 
Posts: 520
Joined: Sun Oct 09, 2005 7:23 pm

Re: How to build 64bit Lib

Postby richard-service » Sun Jan 04, 2015 3:40 pm

Verhoven wrote:I'm tring to convert my software from 32 bits to 64 bits, and still have some issues, but we have write a .bat to build the Hernan's browse lib for 64 bits.
This are the instructions we use and I think my be usefull to you:
Code: Select all  Expand view
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FWH 64 for Harbour 14.02 (MSVC++) Feb.2014       Harbour development power ³Ü
ECHO ³         TWBROWSE                                                           ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

del OK.log

set NAMELIB=TWBRWX64_H.LIB

set FWDIR=C:\fwh64
set HBDIR=C:\harbour

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
REM if "%FWDIR%" == "" set FWDIR=.\..
if "%FWDIR%" == "" set FWDIR=C:\FWH64
if "%HBDIR%" == "" set HBDIR=c:\harbour

ECHO Compilando...

set hdir=%HBDIR%
REM set hdirl=%hdir%\lib\vc64
set hdirl=%hdir%\lib

REM  ----------------------------------------------------------------
REM  --------------  wbrwline.C                      ----------------
REM  ----------------------------------------------------------------

SET CARPETA=.\sourceh\function\twbrowse
SET NAME=wbrwline

cl -D__FLAT__ -D__HARBOUR__ -TC -W3 -O2 -c -I%hdir%\include %CARPETA%\%NAME%.c > comp.log
:ENDCOMPILE

IF ERRORLEVEL 1 GOTO END
ECHO ........... %NAME% Compilada


REM  ----------------------------------------------------------------
REM  --------------  tmultise.PRG                    ----------------
REM  ----------------------------------------------------------------

SET CARPETA=.\sourceh\classes\twbrowse
SET NAME=tmultise
 
%hdir%\bin\harbour %CARPETA%\%NAME%.PRG /n /i%fwdir%\include;%hdir%\include /w /p /d__64__ %2 %3 > comp.log 2> warnings.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
@type warnings.log

cl -TC -W3 -O2 -c -I%hdir%\include %NAME%.c  > comp.log
:ENDCOMPILE

ECHO ........... %NAME% Compilada


REM  ----------------------------------------------------------------
REM  --------------  wbrowse.PRG                     ----------------
REM  ----------------------------------------------------------------

SET NAME=wbrowse
 
%hdir%\bin\harbour %CARPETA%\%NAME%.PRG /n /i%fwdir%\include;%hdir%\include /w /p /d__64__ %2 %3 > comp.log 2> warnings.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
@type warnings.log

cl -TC -W3 -O2 -c -I%hdir%\include %NAME%.c  > comp.log
:ENDCOMPILE

ECHO ........... %NAME% Compilada

REM  ----------------------------------------------------------------
REM  --------------  ENLAZA LA LIBRERIA              ----------------
REM  ----------------------------------------------------------------

echo wbrowse.obj  > msvc.tmp
echo tmultise.obj  >> msvc.tmp
echo wbrwline.obj  >> msvc.tmp

LIB /OUT:.\LIB\%NAMELIB% @msvc.tmp > LIB_ERROR.LOG

IF ERRORLEVEL 1 GOTO LIBERROR
ECHO ................................Lib %NAMELIB% enlazada.

DEL *.OBJ >> %NAMELIB%.log
DEL *.BAK >> %NAMELIB%.log
DEL *.BAK >> %NAMELIB%.log
DEL %NAMELIB%.log >> OK.log

:LIBERROR
@type LIB_ERROR.LOG


GOTO EXIT
ECHO

:COMPILEERROR
@type comp.log
ECHO * Compiling errors *
GOTO EXIT

:LINKERROR
@type LINK_ERRORS.LOG
ECHO * Linking errors *
GOTO EXIT

:EXIT
rem delete temporary files
del wbrowse.c
del tmultise.c
del wbrwline.c
del wbrowse.obj
del tmultise.obj
del wbrwline.obj
del msvc.tmp
del warnings.log
del LIB_ERROR.LOG
del comp.LOG

SET PATH=%OLDPATH%
SET INCLUDE=%OLDINCLUDE%
SET LIB=%OLDLIB%
SET OLDPATH=
SET OLDINCLUDE=
SET OLDLIB=
SET RUTALIB=
SET NAMELIB=


 

good job~
Thanks a lot.
But I hope Antonio can build mak file for LIB.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: How to build 64bit Lib

Postby Antonio Linares » Sun Jan 04, 2015 4:57 pm

Richard,

Please try this one and let me know what errors you get. Thanks

mylib64.bat
Code: Select all  Expand view
@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
) else (
call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
)
make -fmylib64.mak HDIR=C:\HARBOUR
@set path=%oldpath%
@set include=%oldinclude%
@set lib=%oldlib%
@set libpath=%oldlibpath%
@set oldpath=""
@set oldinclude=""
@set oldlib=""
@set oldlibpath=""


mylib64.mak
Code: Select all  Expand view
.path.PRG = .
.path.OBJ = .\obj64
.path.CH  = .\include;c:\harbour\include
.path.C   = .

PRG =        \
ONE.PRG      \
TWO.PRG      \
THREE.PRG

C =                   \
FOUR.C                \
FIVE.C

PROJECT    : mylib64.lib

mylib64.lib : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ)

.PRG.OBJ:
  @if not exist obj64 mkdir obj64
  if not exist lib\mylib64.lib lib /DEF:mylib64.DEF /OUT:mylib64.lib
  $(HDIR)\bin\harbour $< /L /N /W /Oobj64\ /I.\include;$(HDIR)\include
  "$(VCINSTALLDIR)"bin\x86_amd64\cl.exe -c -TC /GS- -I$(HDIR)\include -Foobj64\$& obj64\$&.c
  "$(VCINSTALLDIR)"bin\x86_amd64\Lib mylib64.lib /OUT:mylib64.lib obj64\$&.obj

.C.OBJ:
  if not exist mylib64.lib "$(VCINSTALLDIR)"bin\lib /DEF:mylib64.DEF /OUT:mylib64.lib
  echo -c -TC /GS- -D__HARBOUR__ -D__FLAT__ -I$(HDIR)\include > tmp
  echo -I.\include >> tmp
  "$(VCINSTALLDIR)"bin\x86_amd64\cl @tmp -Foobj64\$& $<
  "$(VCINSTALLDIR)"bin\x86_amd64\lib mylib64.lib /OUT:mylib64.lib obj64\$&.obj
 
regards, saludos

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

Re: How to build 64bit Lib

Postby richard-service » Sun Jan 04, 2015 5:55 pm

Antonio Linares wrote:Richard,

Please try this one and let me know what errors you get. Thanks

mylib64.bat
Code: Select all  Expand view
@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
) else (
call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
)
make -fmylib64.mak HDIR=C:\HARBOUR
@set path=%oldpath%
@set include=%oldinclude%
@set lib=%oldlib%
@set libpath=%oldlibpath%
@set oldpath=""
@set oldinclude=""
@set oldlib=""
@set oldlibpath=""


mylib64.mak
Code: Select all  Expand view
.path.PRG = .
.path.OBJ = .\obj64
.path.CH  = .\include;c:\harbour\include
.path.C   = .

PRG =        \
ONE.PRG      \
TWO.PRG      \
THREE.PRG

C =                   \
FOUR.C                \
FIVE.C

PROJECT    : mylib64.lib

mylib64.lib : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ)

.PRG.OBJ:
  @if not exist obj64 mkdir obj64
  if not exist lib\mylib64.lib lib /DEF:mylib64.DEF /OUT:mylib64.lib
  $(HDIR)\bin\harbour $< /L /N /W /Oobj64\ /I.\include;$(HDIR)\include
  "$(VCINSTALLDIR)"bin\x86_amd64\cl.exe -c -TC /GS- -I$(HDIR)\include -Foobj64\$& obj64\$&.c
  "$(VCINSTALLDIR)"bin\x86_amd64\Lib mylib64.lib /OUT:mylib64.lib obj64\$&.obj

.C.OBJ:
  if not exist mylib64.lib "$(VCINSTALLDIR)"bin\lib /DEF:mylib64.DEF /OUT:mylib64.lib
  echo -c -TC /GS- -D__HARBOUR__ -D__FLAT__ -I$(HDIR)\include > tmp
  echo -I.\include >> tmp
  "$(VCINSTALLDIR)"bin\x86_amd64\cl @tmp -Foobj64\$& $<
  "$(VCINSTALLDIR)"bin\x86_amd64\lib mylib64.lib /OUT:mylib64.lib obj64\$&.obj
 


C:\Source>mylib64
'make' 不是內部或外部命令、可執行的程式或批次檔。(Not an internal or external command, executable program or batch file)
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: How to build 64bit Lib

Postby Antonio Linares » Sun Jan 04, 2015 6:33 pm

Richard,

My mistake. nmake has to be called instead of make. This is the right mylib64.bat

mylib64.bat
Code: Select all  Expand view
@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
) else (
call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
)
nmake -fmylib64.mak HDIR=C:\HARBOUR
@set path=%oldpath%
@set include=%oldinclude%
@set lib=%oldlib%
@set libpath=%oldlibpath%
@set oldpath=""
@set oldinclude=""
@set oldlib=""
@set oldlibpath=""


On a next post I show you some more changes required for mylib64.mak
regards, saludos

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

Re: How to build 64bit Lib

Postby Antonio Linares » Sun Jan 04, 2015 9:59 pm

Richard,

Here you have mylib64.mak. Still it requires some fine tunning, but it is already working :-)

mylib64.mak
Code: Select all  Expand view
.SUFFIXES: .prg .c .obj

PRG =        \
one.prg      \
two.prg      \
three.prg

C =          \
four.c       \
five.c

mylib64.lib : $(PRG:.prg=.obj) $(C:.c=.obj)

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

.prg.c:
  @if not exist obj64 mkdir obj64
  if not exist lib\mylib64.lib lib /DEF:mylib64.DEF /OUT:mylib64.lib
  $(HDIR)\bin\harbour $< /L /N /W /Oobj64\ /I.\include;$(HDIR)\include

.c.obj:
  cl.exe -c -TC /GS- -I$(HDIR)\include -Foobj64\$*.obj obj64\$<
  Lib mylib64.lib /OUT:mylib64.lib obj64\$*.obj /MACHINE:x64
regards, saludos

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

Re: How to build 64bit Lib

Postby Antonio Linares » Sun Jan 04, 2015 10:00 pm

This is the required mylib64.def:

mylib64.def
Code: Select all  Expand view
LIBRARY mylib64
regards, saludos

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

Re: How to build 64bit Lib

Postby Antonio Linares » Sun Jan 04, 2015 10:01 pm

Here you have the nmake documentation. It is good to have it at hand :-)

https://bitbucket.org/fivetech/fivewin-contributions/downloads/nmake_documentation.pdf
regards, saludos

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

Re: How to build 64bit Lib

Postby Antonio Linares » Sun Jan 04, 2015 10:39 pm

This one seems to be a real good one :-)

mylib64.mak
Code: Select all  Expand view
.SUFFIXES: .prg .c .obj

PRG =       \
.\one.prg   \
.\two.prg   \
.\three.prg

C =         \
.\four.c    \
.\five.c

OBJ=$(PRG:.prg=.obj)
OBJS=$(OBJ:.\=.\obj64\)

mylib64.lib : $(OBJS) $(C:.c=.obj)

{.\}.prg{.\obj64}.obj:
  @if not exist obj64 mkdir obj64
  if not exist mylib64.lib lib /DEF:mylib64.DEF /OUT:mylib64.lib /MACHINE:x64
  $(HDIR)\bin\harbour $< /L /N /W /Oobj64\ /I.\include;$(HDIR)\include
  cl.exe -c -TC /GS- -I$(HDIR)\include -Fo$*.obj $*.c
  Lib mylib64.lib /OUT:mylib64.lib $*.obj /MACHINE:x64
 
.c.obj:
  cl.exe -c -TC /GS- -I$(HDIR)\include -Fo$*.obj $<
  Lib mylib64.lib /OUT:mylib64.lib $*.obj /MACHINE:x64
regards, saludos

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

Re: How to build 64bit Lib

Postby richard-service » Mon Jan 05, 2015 3:30 am

Antonio Linares wrote:This one seems to be a real good one :-)

mylib64.mak
Code: Select all  Expand view
.SUFFIXES: .prg .c .obj

PRG =       \
.\one.prg   \
.\two.prg   \
.\three.prg

C =         \
.\four.c    \
.\five.c

OBJ=$(PRG:.prg=.obj)
OBJS=$(OBJ:.\=.\obj64\)

mylib64.lib : $(OBJS) $(C:.c=.obj)

{.\}.prg{.\obj64}.obj:
  @if not exist obj64 mkdir obj64
  if not exist mylib64.lib lib /DEF:mylib64.DEF /OUT:mylib64.lib /MACHINE:x64
  $(HDIR)\bin\harbour $< /L /N /W /Oobj64\ /I.\include;$(HDIR)\include
  cl.exe -c -TC /GS- -I$(HDIR)\include -Fo$*.obj $*.c
  Lib mylib64.lib /OUT:mylib64.lib $*.obj /MACHINE:x64
 
.c.obj:
  cl.exe -c -TC /GS- -I$(HDIR)\include -Fo$*.obj $<
  Lib mylib64.lib /OUT:mylib64.lib $*.obj /MACHINE:x64


Antonio,

It's Work.
Thanks a lot.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 52 guests