T.R | Title | User | Personal Name | Date | Lines |
---|
433.1 | lk? Don't you mean ld? | STAR::BRANDENBERG | Intelligence - just a good party trick? | Fri Mar 17 1989 13:38 | 2 |
|
|
433.2 | | LDP::WEAVER | Laboratory Data Products/Science | Fri Mar 17 1989 13:43 | 4 |
| Yes, I just need to know the string to type.
-Dave
|
433.3 | | MIPSBX::thomas | The Code Warrior | Fri Mar 17 1989 13:54 | 6 |
| Usually some variant of
cc -o target obj1.o obj2.o obj3.o -lddif -ldwt
where -lxxx is for the library of routines you need to link with.
|
433.4 | lk -o modules -ldwt -lX11 -lc -lm /lib/crt0.o | LDP::WEAVER | Laboratory Data Products/Science | Fri Mar 17 1989 17:17 | 6 |
| It turns out it was "lk" that I needed. I also needed "-ldwt -lX11
-lc -lm" and apparently in that order. Only problem now is I am
getting a multiply defined symbol "_calloc" for some reason.
-Dave
|
433.5 | then use "vcc ... -ldwt -lX11 -lm" | MIPSBX::thomas | The Code Warrior | Fri Mar 17 1989 20:12 | 1 |
|
|
433.6 | | PSW::WINALSKI | Paul S. Winalski | Sun Mar 19 1989 16:05 | 15 |
| RE: .4
Rule #1 of linking on Ultrix: never use ld or lk directly--always use cc, vcc,
f77, or fort (depending on whether your application is pure C or contains
FORTRAN modules).
Instead of saying: lk -o modules -ldwt -lX11 -lc -lm /lib/crt0.o
try: vcc -o modules -ldwt -lx11
Among other things wrong with your lk command line, /lib/crt0.o must always come
first.
--PSW
|
433.7 | | LDP::WEAVER | Laboratory Data Products/Science | Tue Mar 21 1989 16:33 | 10 |
| Re: .6
Thanks, I have settled on using:
"vcc -o myprog module1.o module2.o moduleN.o -ldwt -lX11 -lm"
(note the "X" is capitalized).
Thanks,
-Dave
|
433.8 | | PSW::WINALSKI | Paul S. Winalski | Wed Mar 22 1989 21:40 | 4 |
| Damn these case-sensitive operating systems... :-)
--PSW
|