• EMX (was: WinSock Application -> OS/2)

    From mark lewis@1:3634/12 to all on Sun Jun 4 08:23:46 2000
    I'm not under OS/2, but I believe I have sys/socket.h. The
    thing is, certain types (INETADDR is an example IIRC) are
    not defined there, and I can't find the definitions for them.

    The EMX socket headers contain everything necessary for
    writing a socket application using the BSD Unix 4.3 TCP/IP
    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)
  • From Jonathan de Boyne Pollard@2:257/609.3 to mark lewis on Tue Jun 6 16:29:58 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

    You've forgotten to specify some library or other. FInd out which library defines those symbols and add it to the command line.

    » JdeBP «

    --- FleetStreet 1.22 NR
    * Origin: JdeBP's point, using Squish <yuk!> (2:257/609.3)
  • From mark lewis@1:3634/12 to Jonathan de Boyne Pollard on Fri Jun 9 13:19:54 2000
    4OS/2 (0) | D:\os2progs\syspage >gcc sysphmsg.c
    c:\tcpip\tmp\ccc00361: Undefined symbol _inet_addr referenced from
    text segment
    [trim]
    c:\tcpip\tmp\ccc00361: Undefined symbol _sendto referenced from text
    segment

    JdBP> You've forgotten to specify some library or other. FInd out
    JdBP> which library defines those symbols and add it to the command
    JdBP> line.

    this kind of references into another message i wrote in this area about the same time as i wrote the above... that message talks about apparently needing a
    developers toolkit to get types.h for os/2 programs... i've got warp 3 w/no fixpaks not sure what else... what would i look for if i had it so i can put it
    in the right place?

    )\/(ark


    * Origin: (1:3634/12)