From: Chris <cbo...@mi...> - 2002-08-30 02:23:11
|
OK, that solved part of the problem. Thanks, I didn't know the proper gcc options to use. I still get this error though: as -o BuildWAtkTab.o BuildWAtkTab.s BuildWAtkTab.s: Assembler messages: BuildWAtkTab.s:35: Error: suffix or operands invalid for `mov' BuildWAtkTab.s:44: Error: suffix or operands invalid for `mov' Paradoxically, when I remove those #sec:0 references to eliminate the above error, the gcc step still chokes: gcc -o BuildWAtkTab BuildWAtkTab.o -lhtcobol -lhtcobol2 -lm -ldb -ldl BuildWAtkTab.o: In function `main': BuildWAtkTab.o(.text+0x4c): undefined reference to `ww_base0' BuildWAtkTab.o(.text+0x68): undefined reference to `ww_base0' collect2: ld returned 1 exit status On Thu, 2002-08-29 at 17:46, Rildo Pragana wrote: Hi Chris, =20 On 29 Aug 2002, Chris Borgn=E6s wrote: =20 > 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 main, %eax > pushl %eax > leal .Lend_pgm_main, %eax > pushl %eax > pushl $3 > movl $ww_base0+4 #sec:0, %eax > pushl %eax > movl $w_base0+4, %eax > pushl %eax > movl $s_base0+4, %eax > pushl %eax > call cob_open > addl $16, %esp > pushl $3 > movl $ww_base0+38 #sec:0, %eax > pushl %eax > movl $w_base0+20, %eax > pushl %eax > movl $s_base0+38, %eax > pushl %eax > call cob_open > > The as command seems to work fine once I remove the #sec:0 entries, b= ut > 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? > =20 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. =20 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 =20 =20 =20 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Tin...@li... https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users =20 |