• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

What libs should be linked to a TCP/IP app?

Started by djcaetano, 2008.12.20, 14:30:33

Previous topic - Next topic

djcaetano


  Hi,

  I'm trying to compile Squeak 3.5 for OS/2 to correct some bugs from the
published version (no text file export, for one). Since VAC++ is dead ,
I am trying to use OpenWatcom and I am experiencing a little problem
that makes me feel a n00b... :P
  The problem is I was able to build it, but I was not find what lib I have
to link with the executable to resolve these functions:

  select
  soclose
  gethostname

  I know they are TCP/IP functions, but I had tried to link several
libraries but none of them seems to implement these functions.
   Anyone knows what library do I have to link?

  Regards,

  Daniel Caetano

Andi

I' pretty sure tcpip32.lib is enough. If you are using /DTCPV40HDRS, probably so32dll.lib and tcp32dll.lib

Regards,
Andi

DavidG

I asked the FM/2 team and Gregg confirms what Andi stated.

I'm pretty sure it is.

U:\WATCOM\lib386\os2\tcpip32.lib

Gregg

djcaetano

Quote from: DavidG on 2008.12.20, 19:14:51
I asked the FM/2 team and Gregg confirms what Andi stated.
I'm pretty sure it is.
U:\WATCOM\lib386\os2\tcpip32.lib
Gregg

  Ah, thanks. It was missing an include also... :)
  #include <unistd.h>, something I believe doesn't exist in VAC++ world.
  Not it compiled without errors (only a thousand warnings, but that's the first step... ehheeh)

  Thanks!

Andi

I use the os2 toolkit headers and link with "P:\os2tk45\lib\tcpip32.lib" even when compiling with OpenWatcom. No idea if watcom or toolkit headers/libraries are better or why one should be preferred over the other....

DavidG

Andi

As you probably know, FM/2 has switched over to Open Watcom.  The only reason the OS/2 toolkit is needed is for ipfc.exe.  It is needed to compile the HLP file.  Steven has updated the wrc.exe in the toolkit, fixing some bugs and adding some needed features.  It will be included in Open Watcom 1.8 when released.

Since FM/2 is being actively developed, programmers could learn a lot by monitoring FM2dev group. 

news://news.gmane.org:119/gmane.org.netlabs.fm2.devel

Here is something the team just discovered and had to work around.

This is another case where OpenWatcom is just different.  It's the only
linker I know of that does not list the symbols in numeric order, either
automatically or as an option.  The symbols are mostly in numeric order,
but fm/2's heavy use of alloc_text cause this not be true in all cases.

DavidG

Steven had this reply.

Hi guys,

> >  The problem is I was able to build it, but I was not find what lib I
> >have to link with the executable to resolve these functions:

> >  select
> >  soclose
> >  gethostname

You need to link with the TCP/IP libraries.  You need library statements
for tcp32dll.lib and so32dll.lib.

If you want to run with the 16-bit stack, you need to define TCPV40HDRS.

Have fun,

Steven