Path: utzoo!utgpu!water!watmath!clyde!rutgers!iuvax!pur-ee!pur-phy!murphy From: murphy@pur-phy (William J. Murphy) Newsgroups: comp.sys.ibm.pc Subject: MSC 4.0 Lib usage? Summary: Help!! (*long*) Message-ID: <998@pur-phy> Date: 19 Feb 88 14:48:25 GMT Reply-To: murphy@newton.physics.purdue.edu.UUCP (William J. Murphy) Distribution: na Organization: Purdue Univ. Physics Dept., W. Lafayette, IN Lines: 38 HELP !! I have been trying to learn the appropriate usage of the Lib utility in microsoft c 4.0. I have created a set of subroutines which manipulate complex numbers using the structure defined in math.h (structure { double x,y; };). I have used the subroutines as source code in an include file named cmath.h and stuck the file in directory \include. Now, I wish to combine the cmath.h object code with the library(ies) in \Lib. So far, I have separated each subroutine (e.g. cadd.c, csub.c, ...) and compiled them separately with the command msc /AL. I have used Lib to create a library called cmath.lib which contains (I think) all of my object code. I looked at cmath.lib with pctools saw each subroutine name in the library. I also took math.h, removed all of MSC function names, and edited in all of the function names I have created into math.h and removed two of the structure declarations that will be redundant when including math.h. (I assume that the user will also include math.h) I renamed my edited math.h to cmath.h. I put cmath.h in \include, cmath.lib in \lib and local directory. When I cl /AL prog.c cmath.lib I get invalid object module cmath.lib pos:1 Record type : F0 What do I need to do to make the cmath.lib file and include file? I am not a hacker, so be gentle and explicit. I prefer e-mail, but this may be of general interest. Thanks, William J. Murphy | Does Ralph Nader know anything | Physics Dept. | about noise pollution and the | Purdue University | problem of cochlear emissions? | murphy@newton.physics.purdue.edu