An issue and question about HBMK2 settings
Posted: Sat Mar 23, 2013 3:28 pm
Hello All,,,
I hope this is entertaining. Here is a hbp I'm having a simple problem with.
I have read and studied all the hbmk2 information that I can find.
I have used hbmk2 a lot and have had good (lucky) results. I have compiled a lot of applications and re-written library files with it.
Below is a hbp. The "Topprog.prg" calls about 90 routines, one of them is
"userstat" (it's a .prg file and is a simple screen routine in the corner of the
menu that shows the user some basic info)
One of the other programs in the hbp list "tools1" also calls this same
"userstat" routine in one of it's functions. In both cases, it is called with a
simple "do userstat"
With my current settings, I get an exit status because of this, and my compile
stops. Of course I can fix it,, but I'm trying to learn something.
Here is the .hbp
-oTopProg.exe
-es0 (These settings were just experimenting around, both on and off)
#-w1
topprog.prg (calls do userstat)
tools1.prg (also calls: do userstat)
tools2.prg
tools3.prg
ps32.hbc (pagescript,, it's ok)
Harbour(3.0) finds this double call to "userstat" and complains about it
-----------
C:/Temp/hbmk_fft21e.dir/tools1.o:tools1.c:(.text+0x0):
multiple definition of `HB_FUN_USERSTAT'
C:/Temp/hbmk_fft21e.dir/topprog.o:topprog.c:(.text+0x78
0): first defined here
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
-----------
So, is there a basic setting or method to avoid this that I need to learn about ?
I have tried the /m switch after each of the tool* programs, but in that case I
get some undefined references to some other functions that are in "topprog". In other words, the errors are worse !
This is a big old application that has been in service for decades.
Here is the .bat file used to compile in Clipper,, all ok for years.
CLIPPER topProg
clipper tools1 /m
clipper tools2 /m
clipper tools3 /m
rtlink FI topprog,tools1,tools2,tools3 VERBOSE lib grump52,clipper,extend,esc30_52
Thanks, and good day to all
Bill
I hope this is entertaining. Here is a hbp I'm having a simple problem with.
I have read and studied all the hbmk2 information that I can find.
I have used hbmk2 a lot and have had good (lucky) results. I have compiled a lot of applications and re-written library files with it.
Below is a hbp. The "Topprog.prg" calls about 90 routines, one of them is
"userstat" (it's a .prg file and is a simple screen routine in the corner of the
menu that shows the user some basic info)
One of the other programs in the hbp list "tools1" also calls this same
"userstat" routine in one of it's functions. In both cases, it is called with a
simple "do userstat"
With my current settings, I get an exit status because of this, and my compile
stops. Of course I can fix it,, but I'm trying to learn something.
Here is the .hbp
-oTopProg.exe
-es0 (These settings were just experimenting around, both on and off)
#-w1
topprog.prg (calls do userstat)
tools1.prg (also calls: do userstat)
tools2.prg
tools3.prg
ps32.hbc (pagescript,, it's ok)
Harbour(3.0) finds this double call to "userstat" and complains about it
-----------
C:/Temp/hbmk_fft21e.dir/tools1.o:tools1.c:(.text+0x0):
multiple definition of `HB_FUN_USERSTAT'
C:/Temp/hbmk_fft21e.dir/topprog.o:topprog.c:(.text+0x78
0): first defined here
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
-----------
So, is there a basic setting or method to avoid this that I need to learn about ?
I have tried the /m switch after each of the tool* programs, but in that case I
get some undefined references to some other functions that are in "topprog". In other words, the errors are worse !
This is a big old application that has been in service for decades.
Here is the .bat file used to compile in Clipper,, all ok for years.
CLIPPER topProg
clipper tools1 /m
clipper tools2 /m
clipper tools3 /m
rtlink FI topprog,tools1,tools2,tools3 VERBOSE lib grump52,clipper,extend,esc30_52
Thanks, and good day to all
Bill