Subj : EMX (was: WinSock Application -> OS/2)
To   : all
From : mark lewis
Date : Sun Jun 04 2000 08:23 am

AT>> I'm not under OS/2, but I believe I have sys/socket.h.  The
AT>> thing is, certain types (INETADDR is an example IIRC) are
AT>> not defined there, and I can't find the definitions for them.

TE> The EMX socket headers contain everything necessary for
TE> writing a socket application using the BSD Unix 4.3 TCP/IP
TE> interface (at least).

i have a neat little system monitoring program here that emits html code...
this program also has the ability to send commands to the system via a cgi
program... the problem that i'm running into is as follows...

 1. i'm a pascal type of guy
 2. the cgi interface program is written in C
 3. i have to compile the cgi interface program
 4. i have the following EMX installed and operational

    [from EMXREV]
    EMX : revision = 60
    EMXIO : revision = 60
    EMXLIBC : revision = 60
    EMXLIBCM : revision = 60
    EMXLIBCS : revision = 60
    EMXWRAP : revision = 60

 5. the .c file starts off like this

    /*
     * Include Files.
     */
    #ifdef __OS2__
    #include <types.h>
    #define perror(x) psock_errno(x)
    #define close(x)  soclose(x)
    #else
    #include <sys/types.h>
    #endif
    #include <unistd.h>
    #include <errno.h>
    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <fcntl.h>
    #include <sys/socket.h>
    #include <sys/stat.h>
    #include <netinet/in.h>
    #include <netdb.h>

 6. when i compile the .c file (ie: gcc thefile.c)
    i get the following output and no executable...

     3:18
    Sun  Jun 4, 2000
    4OS/2 (0) | D:\os2progs\syspage >gcc sysphmsg.c
    c:\tcpip\tmp\ccc00361: Undefined symbol _inet_addr referenced from text
segment
    c:\tcpip\tmp\ccc00361: Undefined symbol _gethostbyname referenced from
text segment
    c:\tcpip\tmp\ccc00361: Undefined symbol _strcasecmp referenced from text
segment
    c:\tcpip\tmp\ccc00361: Undefined symbol _strcasecmp referenced from text
segment
    c:\tcpip\tmp\ccc00361: Undefined symbol __swaps referenced from text
segment
    c:\tcpip\tmp\ccc00361: Undefined symbol _socket referenced from text
segment
    c:\tcpip\tmp\ccc00361: Undefined symbol _sendto referenced from text
segment

 7. i know that i don't have a types.h file in my emx\include folder
 8. i know that i do have a types.h in my emx\include\sys folder

i =think= that i need to put an ifdef for EMX in there to include a different
TYPES.H file but not knowing much about this stuff, i'm here for assistance
<<GG>>  it may be also that i need the IBM Programmers Toolkit for OS/2 Warp
3.0 ???

)\/(ark


* Origin: (1:3634/12)