In article <[log in to unmask]>, [log in to unmask]
 (Randy Kaelber) writes:
> George ([log in to unmask]) wrote:
>> I have written a program in C that takes the input of a web page form and
>> mails the results to a list of people.  Under Linux it compiles, links,
>> and runs perfectly.  On the VAX, it compiles (after writing my own strdup)
>> and then complains of the following linker errors:
>
>> %LINK-I-UDFSYM,         CONNECT
>> %LINK-I-UDFSYM,         HTONS
>> %LINK-I-UDFSYM,         INET_ADDR
>> %LINK-I-UDFSYM,         RECV
>> %LINK-I-UDFSYM,         SEND
>> %LINK-I-UDFSYM,         SOCKET
>
>> I typed:
>> cc form.c
>> link form.obj /executable=form.cgi
>
>> Anyone know of a way to link in those functions?
>
> Try this (I'm sure Kent will give you the lowdown if I'm wrong):
>
> $ link form.obj /exec=form.cgi,SYS$INPUT:/opt
> multinet_nw_client_library/share
> multinet_socket_library/share
>
> Then press ctrl-Z to terminate the input.
 
Wow.  I'm VERY impressed.  You got it exactly right, except you don't need
the multinet_nw_client_library/share line (that's just if you're writing a
program that's using the Netware functions).
 
You can make this a little simpler by creating a file called something
like form.opt with the "multinet_socket_library/share" line in it.  Then
you can change the link command to just:
 
    $ link form.obj, form.opt/opt
 
I would recommend that you leave your executable as a .EXE rather than a
CGI.  The web server is going to be really confused with an extension of
CGI (the web server uses the file extension to figure out what to do with
the file).
 
Also, did you realize that the system already has a program that mails the
output of a form to someone?  You can check it (and other WWW server
features) out at:
 
  http://www.muohio.edu/cwis/servers/www/openvms/
 
--
                                     Kent Covert, Software Coordinator
                                     Miami Computing and Information Services
                                     Miami University, Oxford, OH
                                     [log in to unmask]