Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* HELP: Can't link GCC .OBJ files
@ 1993-04-04 23:52 claridge
  1993-04-05  3:01 ` claridge
  1993-04-05 14:32 ` Srinivasan Murari
  0 siblings, 2 replies; 3+ messages in thread
From: claridge @ 1993-04-04 23:52 UTC (permalink / raw)


Hi,

We pulled GNU-C off the decus library tapes, un back-up'd it and
followed the instructions from the various read-me's, etc. (we think)

Anyway, we can easily compile, no wories!! Beaut! UNNNNfortunately, we
can't link the compiled .OBJ (not Beaut) .

Example file (hello-world) below.

File: Hello.c  (not incl the `-------'s)
-------------------------------------------------------
#include<stdio.h>
main()
{
puts("hello world\n") ;
}
-------------------------------------------------------
VAX instructions given: (VMS V5.4-3)
$ GCC HELLO 		(completes, no errors, surprise, surprise)
$ LINK HELLO
%LINK-W-NUDFSYMS, 2 undefined symbols:
%LINK-I-UDFSYM,         C$MAIN_ARGS
%LINK-I-UDFSYM,         PUTS
%LINK-W-USEUNDEF, undefined symbol PUTS referenced
        in psect $CODE offset %X0000001B
        in module HELLO file USER2:[CLARIDGE.GENERAL]HELLO.OBJ;2
%LINK-W-USEUNDEF, undefined symbol C$MAIN_ARGS referenced
        in psect $CODE offset %X00000011
        in module HELLO file USER2:[CLARIDGE.GENERAL]HELLO.OBJ;2

We have tried using explicit link library commands e.g.
$ LIN HELLO , SYS$GCCDIR:GCCLIB/LIBRARY
same (exactly) error message.

WHY ?????

Please, someone help me I am going gaga!

Regards, Robert Burling-Claridge, WRONZ, Lincoln, NZ.
Internet : CLARIDGE@WRONZ.ORG.NZ        PSI : (05301)30000047::CLARIDGE 
snail  : Wool Research Organisation of NZ, Private Bag 4749, 
         Christchurch, New Zealand
"Why would anyone need a computer of their own ? " -- Ken Olsen, 1974.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: HELP: Can't link GCC .OBJ files
  1993-04-04 23:52 HELP: Can't link GCC .OBJ files claridge
@ 1993-04-05  3:01 ` claridge
  1993-04-05 14:32 ` Srinivasan Murari
  1 sibling, 0 replies; 3+ messages in thread
From: claridge @ 1993-04-05  3:01 UTC (permalink / raw)


In article <1993Apr5.115215.118@wronz.org.nz>, claridge@wronz.org.nz writes:

> Hi,
> 
> We pulled GNU-C off the decus library tapes, un back-up'd it and
> followed the instructions from the various read-me's, etc. (we think)
> 
> Anyway, we can easily compile, no wories!! Beaut! UNNNNfortunately, we
> can't link the compiled .OBJ (not Beaut) .
> 

Thanks to all those who replied, saved me a lot of heartache, I decided to
implement a C.OPT file containing
                         
SYS$LIBRARY:VAXCRTL.EXE/SHARE
SYS$GCCDIR:GCCLIB/LIBRARY

and write a quick DCL procedure to 

LINK <files> , SYS$GCCDIR:C/opt

To sheild our poor users a bit from the complexities of using a
computer (sigh :-) )

--
Regards, Robert Burling-Claridge, WRONZ, Lincoln, NZ.
Internet : CLARIDGE@WRONZ.ORG.NZ        PSI : (05301)30000047::CLARIDGE 
snail  : Wool Research Organisation of NZ, Private Bag 4749, 
         Christchurch, New Zealand
"Why would anyone need a computer of their own ? " -- Ken Olsen, 1974.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: HELP: Can't link GCC .OBJ files
  1993-04-04 23:52 HELP: Can't link GCC .OBJ files claridge
  1993-04-05  3:01 ` claridge
@ 1993-04-05 14:32 ` Srinivasan Murari
  1 sibling, 0 replies; 3+ messages in thread
From: Srinivasan Murari @ 1993-04-05 14:32 UTC (permalink / raw)



Judging by your note I shall assume you are new to VMS.
Unlike Unix where the C runtime library libc.a gets linked
in by default, you would have to explicitly do so on VMS.

Therefore try 

$ LINK HELLO, SYS$LIBRARY:VAXCRTL/LIB

For further information on how to link and run C programs please
read the VAX runtime manual.

/murari


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1993-04-05 14:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-04-04 23:52 HELP: Can't link GCC .OBJ files claridge
1993-04-05  3:01 ` claridge
1993-04-05 14:32 ` Srinivasan Murari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox