I'm using a development platform called Harbour to use Clipper code to create a Linux executable working on 32bit SuSe.
I can already create an executable that still requires external libraries of the platform, but I need to create an executable that is stand-alone. Harbour allows me to do that by including all needed libraries, but when I try the following compile command:
hbmk test3 -static
I get the following error output:
Harbour 2.0.0 (Rev. -1)
Copyright (c) 1999-2010, http://www.harbour-project.org/
Compiling 'test3.prg'...
Lines 3, Functions/Procedures 1
Generating C source output to 'test3.c'... Done.
/usr/lib/gcc/i586-suse-linux/4.5/../../../crt1.o: In function
`_start':
/usr/src/packages/BUILD/glibc-2.11.2/csu/../sysdeps/i386/elf/start.S:
115: undefined reference to `main'
./test3.o: In function `HB_FUN_MAIN':
test3.c:(.text+0x17): undefined reference to `hb_vmExecute'
./test3.o: In function `hb_vm_SymbolInit_TEST3':
test3.c:(.text+0x4e): undefined reference to `hb_vmProcessSymbols'
./test3.o:(.data+0x38): undefined reference to `HB_FUN_QOUT'
/tmp/cc5KcKMd.o: In function `hb_lnk_SetDefault_build':
hb-build-root-24212.c:(.text+0x1e): undefined reference to
`hb_vmSetDefaultGT'
/tmp/cc5KcKMd.o: In function `_hb_lnk_ForceLink_build':
hb-build-root-24212.c:(.text+0x8): undefined reference to
`HB_FUN_HB_GT_STD'
collect2: ld returned 1 exit status
My code at this time is extremely simple and dumbed down:
function main()
? "All done."
return nil
(It basically outputs "All done." onto the screen, and that's all I'm making it do until I can get it to compile properly.)
From my 90 minutes of trying to track down this issue, it sounds like either it can't find the function 'main' (which is clearly there), or the c compiler needs the -g parameter set - which is something I can't do because I don't actually address the compiler myself - the Harbour compiler does everything by itself...
I also would like to point out that the path
/usr/src/packages/BUILD
is empty on my system! However, the full path mentioned in the error on top is hard-coded into the file crt1.o...
I even tried telling the compiler to create a c object and compile that, but it doesn't produce the correct input file for the c compiler, and I'm fairly new to both clipper and c...
I apologize if I didn't tag this issue correctly - this is my first stackoverflow post - but I've seen plenty of extremely knowledgeable answers here on other topics, so I decided to give it a try. If there's any more information needed, please let me know.
Thanks in advance!