jyothi@franklin.ee.umr.edu (Jyothi Nagaraj) (05/28/91)
I am working on a program written in MS C 6.0 for OS/2 environment which uses named pipes. It is a demo profram called "npserver.c". I am trying to add on some stuff to the program and recompile it. But, I am not able to recompile it since it says it cannot find the "include" file "<mt\string.h>". Now the person who has written the program(unknown) has used the include statements in the foll manner: #include<mt\string.h> #include<mt\stdio.h> #include<mt\process.h> I am pretty sure that in this case 'mt' is not a sub-directory. I assume it is something to do with 'multi-threading'. The program contains the _beginthread, etc. kind of statements used to create many 'pipe instances'. BTW, this is the server program which is trying to communicate with another client program. I tried compiling with the /MT option, but didn't work. Also, when I tried without having the mt\ in the include statements, I got a number of fatal errors which do not recognise the PIPE ACCESS commands. Can anyone give me any information as to how to go about this? Also, any good suggestions as far as material on Named Pipes goes is welcome. Thanks in advance. Please reply to : jyothi@ee.umr.edu
wbonner@yoda.eecs.wsu.edu (Wim Bonner) (05/28/91)
In article <2765@umriscc.isc.umr.edu> jyothi@ee.umr.edu (Jyothi Nagaraj) writes: > > I am working on a program written in MS C 6.0 for OS/2 environment >which uses named pipes. It is a demo profram called "npserver.c". >I am trying to add on some stuff to the program and recompile it. >But, I am not able to recompile it since it says it cannot find the >"include" file "<mt\string.h>". Now the person who has written the >program(unknown) has used the include statements in the foll manner: I would assume that the program was originally developed using a C Cmpiler that was not well suited to multi-threaded stuff, and had seperate include files for the multi-threaded system calls. With C 6.0, you should be able to just use the standard "<string.h>" instead of "<mt/string.h>". You would want to use the /MT option, and I know that pwb defines _MT when I compile my programs multi-threaded. (-MT -D_MT) Wim -- | wbonner@yoda.eecs.wsu.edu |P.O.Box 2062cs |The Loft BBS |27313853@wsuvm1.csc.wsu.edu|Pullman WA 99165|Currently down for the summer. | 72561.3135@CompuServe.com |(509)334-4626 |USR HST Dual Standard HST/V.32
d88-pfo@dront.nada.kth.se (Peter Forsberg) (05/28/91)
In article <2765@umriscc.isc.umr.edu> jyothi@franklin.ee.umr.edu (Jyothi Nagaraj) writes:
I am working on a program written in MS C 6.0 for OS/2 environment
which uses named pipes. It is a demo profram called "npserver.c".
I am trying to add on some stuff to the program and recompile it.
But, I am not able to recompile it since it says it cannot find the
"include" file "<mt\string.h>". Now the person who has written the
program(unknown) has used the include statements in the foll manner:
#include<mt\string.h>
#include<mt\stdio.h>
#include<mt\process.h>
[...]
The program could have been written for an older version of MS C or
the IBM C/2 compiler. At least the latter has a directory called MT
under the INDLUDE directory. This contains headerfiles matching the
special MT (multitasking) library supplied with that compiler. Now,
MS C 6.00 has, I believe, all reentrant library functions, and so
doesn't need a separate library with separate headerfiles.
Thanks in advance.
Please reply to : jyothi@ee.umr.edu
Peter.
--
Peter A. Forsberg
Royal Institute of Technology, Stockholm, Sweden.
IBM Sweden, Banking & Finance Applications.
E-mail: d88-pfo@nada.kth.se or peterf@stovm1.vnet.ibm.com
#include <standard.disclaimer>
mem@zinn.MV.COM (Mark E. Mallett) (05/28/91)
In article <2765@umriscc.isc.umr.edu> jyothi@ee.umr.edu (Jyothi Nagaraj) writes: > > I am working on a program written in MS C 6.0 for OS/2 environment >which uses named pipes. It is a demo profram called "npserver.c". >I am trying to add on some stuff to the program and recompile it. >But, I am not able to recompile it since it says it cannot find the >"include" file "<mt\string.h>". Last I knew, you could get all the definitions you need by defining the appropriate constants before including os2.h; e.g., to get basic OS definitions (including named pipe stuff), do: #include <stdio.h> #include <string.h> #define INCL_BASE #include <os2.h> >Also, any good suggestions as far as material on Named Pipes goes >is welcome. My program, 'timex', contains a server and client that communicate via named pipe. The server implements a cron-like function, and the client provides a PM interface to it. The program was written specifically as an example -- a working one, mind you -- of various OS/2 facilities. Available on request. -mm- -- Mark E. Mallett Zinn Computer Co/ PO Box 4188/ Manchester NH/ 03103 Bus. Phone: 603 645 5069 Home: 603 424 8129 BIX: mmallett uucp: mem@zinn.MV.COM ( ...{decvax|elrond|harvard}!zinn!mem ) Northern MA and Southern NH consultants: Ask (in mail!) about MV.COM