James,
I'm having quite a bit of difficulty getting the simplest program to properly link when I use libbxblib.a.
I have examined all the files you provided and just can't figure out what the issue is.
Here is the error message I get when I use "ld" alone:
steve@steve-VirtualBox:~/Jwasm206/bxbasm$ ld -o test2 test2.o -L/home/steve/Jwasm206/lib -lbxblib
test2.o: In function `_start':
test2.asm:(.text+0x8): undefined reference to `exit'
test2.o: In function `_Main@0':
test2.asm:(.text+0x11): undefined reference to `_Do_initialize@0'
test2.asm:(.text+0x1b): undefined reference to `_StdOut@4'
test2.asm:(.text+0x25): undefined reference to `_StdOut@4'
/home/steve/Jwasm206/lib/libbxblib.a(getch.o): In function `initTermios':
getch.c:(.text+0x16): undefined reference to `tcgetattr'
getch.c:(.text+0xf4): undefined reference to `tcsetattr'
/home/steve/Jwasm206/lib/libbxblib.a(getch.o): In function `resetTermios':
getch.c:(.text+0x118): undefined reference to `tcsetattr'
/home/steve/Jwasm206/lib/libbxblib.a(getch.o): In function `getch_':
getch.c:(.text+0x130): undefined reference to `getchar'
steve@steve-VirtualBox:~/Jwasm206/bxbasm$
here is the command line:
ld -o test2 test2.0 -L/home/steve/Jwasm206/lib -lbxblib
Despite all the errors, I actually get more information from "ld" that if I just use "gcc".
When I use gcc, as illustrated in your above post, all I get is:
steve@steve-VirtualBox:~/Jwasm206/bxbasm$ gcc -s -nostartfiles -o test2 test2.o -L/home/steve/Jwasm206/bxbasm/lib/ -llibbxblib.a
/usr/bin/ld: cannot find -llibbxblib.a
collect2: ld returned 1 exit status
steve@steve-VirtualBox:~/Jwasm206/bxbasm$
It seems to matter not how I spell the lib name: -llibbxblib.a, -lbxblib, -lbxblib.a, ...etc.
The error is always the same.
Here is my path layout:
/home/steve/Jwasm206/bin
/home/steve/Jwasm206/bxbasm
/home/steve/Jwasm206/include
/home/steve/Jwasm206/lib
I work from within
/home/steve/Jwasm206/bxbasm/
there resides: test2.bas and test2.o.
My basic script is:
PRINT "hello world"
END
It translates and assembles fine.
I just can't figure what the problem with linking is, with gcc or ld.
Do you have any ideas ?
Steve