From: Rildo P. <ri...@pr...> - 2002-08-30 01:44:06
|
Hi Chris, On 29 Aug 2002, Chris Borgn=E6s wrote: > It's been years and years since I really looked at assembler, but I > found an oddity. I try to build my program and I get the following > error: > BuildWAtkTab.s: Assembler messages: > BuildWAtkTab.s:35: Error: suffix or operands invalid for `mov' > BuildWAtkTab.s:44: Error: suffix or operands invalid for `mov' > > I do a htcobol -S and look at the result and this is what I see: > > .Linite_main: > leal=09main, %eax > =09pushl=09%eax > =09leal=09.Lend_pgm_main, %eax > =09pushl=09%eax > =09pushl=09$3 > =09movl=09$ww_base0+4 #sec:0, %eax > =09pushl=09%eax > =09movl=09$w_base0+4, %eax > =09pushl=09%eax > =09movl=09$s_base0+4, %eax > =09pushl=09%eax > =09call=09cob_open > =09addl=09$16, %esp > =09pushl=09$3 > =09movl=09$ww_base0+38 #sec:0, %eax > =09pushl=09%eax > =09movl=09$w_base0+20, %eax > =09pushl=09%eax > =09movl=09$s_base0+38, %eax > =09pushl=09%eax > =09call=09cob_open > > The as command seems to work fine once I remove the #sec:0 entries, but > gcc fails: > gcc -o BuildWAtkTab BuildWAtkTab.o -lhtcobol -lm > BuildWAtkTab.o: In function `main': > BuildWAtkTab.o(.text+0x4c): undefined reference to `ww_base0' > BuildWAtkTab.o(.text+0x68): undefined reference to `ww_base0' > /usr/local/lib/libhtcobol.a(fileio.o): In function `cob_open': > fileio.o(.text+0x563): undefined reference to `__db185_open' > fileio.o(.text+0x5d6): undefined reference to `__db185_open' > /usr/local/lib/libhtcobol.a(fileio.o): In function `sort_open': > fileio.o(.text+0x385f): undefined reference to `__db185_open' > collect2: ld returned 1 exit status > > What's wrong? > Well, from the errors shown by gcc, it seems you missed to include -ldb to link with libdb. It is needed if your program uses any kind of file access, even if no indexes are in use. best regards, Rildo ------------------------------------------------------------------ Rildo Pragana FPGA/uControllers * Linux * tcl/tk R.Joaquim Nabuco,92/302 Derby http://www.pragana.net Recife, PE - Brazil 52011-000 +55-81-3223-5694 |