Funciones propias en una lib (Solucionado)

User avatar
Antonio Linares
Site Admin
Posts: 42513
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Funciones propias en una lib

Post by Antonio Linares »

Cambia esta línea:

mylib.lib : $(PRG:.PRG=.OBJ)

así:

mylib.lib : $(PRG:.prg=.obj)

Y está tambien:

.PRG.OBJ:

con:

.prg.obj:

Los ficheros make distinguen entre mayúsculas y minúsculas
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42513
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Funciones propias en una lib

Post by Antonio Linares »

Y esta:

.C.OBJ:

por:

.c.obj:
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Compuin
Posts: 1250
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 7 times
Been thanked: 3 times

Re: Funciones propias en una lib

Post by Compuin »

Gracias maestro

Ahora arroja este error

C:\SGE>make -fmylib.mak
MAKE Version 5.41 Copyright (c) 1987, 2014 Embarcadero Technologies, Inc.
\bin\harbour .\prg\mainwin.prg /N /W /es2 /Oobjh\ /I.\include;\include >
comp.log
Fatal: Unable to execute command: \bin\harbour
C:\SGE>mylib
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

Re: Funciones propias en una lib

Post by goosfancito »

proba el programa que hice hace un tiempo se llama Make Script2 si mal no recuerdo.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
Compuin
Posts: 1250
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 7 times
Been thanked: 3 times

Re: Funciones propias en una lib

Post by Compuin »

No, gracias

Prefiero los mak y bat
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

Re: Funciones propias en una lib

Post by goosfancito »

ok.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
Compuin
Posts: 1250
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 7 times
Been thanked: 3 times

Re: Funciones propias en una lib

Post by Compuin »

Algun advise ?
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
User avatar
acuellar
Posts: 1645
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Funciones propias en una lib

Post by acuellar »

Yo uso un .PRG donde coloco todas mis funciones comunes que se llama FUNCIONES.PRG y es como un programa mas.

Poner las funciones o procesos en una LIB implica que si se hace algún cambio hay que recompilarla.
Saludos,

Adhemar C.
User avatar
Compuin
Posts: 1250
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 7 times
Been thanked: 3 times

Re: Funciones propias en una lib

Post by Compuin »

Asi es pero esta es una LIB que no requerira cambio y de tenerlos, se recompila.
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
User avatar
Antonio Linares
Site Admin
Posts: 42513
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Funciones propias en una lib

Post by Antonio Linares »

Te falta una B aqui:

$(HDIR)\bin\harbour

debiera ser:

$(HBDIR)\bin\harbour
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Compuin
Posts: 1250
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 7 times
Been thanked: 3 times

Re: Funciones propias en una lib

Post by Compuin »

C:\SGE>go

C:\SGE>set path=C:\bcc7\bin

C:\SGE>make -fmylib.mak
MAKE Version 5.41 Copyright (c) 1987, 2014 Embarcadero Technologies, Inc.
c:\harbour\bin\harbour .\prg\mainwin.prg /N /W /es2 /Oobjh\ /I.\include;c
:\harbour\include > comp.log
.\prg\mainwin.prg(1) Error F0029 Can't open #include file 'fivewin.ch'

** error 1 ** deleting .\mainwin.obj
C:\SGE>go



MAINWIN.PRG

#include "fivewin.ch"

function test()
? "test"
return nil
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Funciones propias en una lib

Post by cnavarro »

El path de FW es correcto?

FWDIR=c:\fwh
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
Compuin
Posts: 1250
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 7 times
Been thanked: 3 times

Re: Funciones propias en una lib

Post by Compuin »

Si es correcto
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Funciones propias en una lib

Post by cnavarro »

Y esta linea la tienes incluida?

.path.ch = $(FWDIR)\include;$(HBDIR)\include
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
Compuin
Posts: 1250
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 7 times
Been thanked: 3 times

Re: Funciones propias en una lib

Post by Compuin »

BCCDIR=c:\bcc7
HBDIR=c:\harbour
FWDIR=c:\fwh

.path.obj = .\obj
.path.prg = .\prg
.path.ch = $(FWDIR)\include;$(HBDIR)\include
.path.c = .\
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Post Reply