home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!inmet!bu.edu!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!wupost!gumby!yale!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!uknet!cvedg!medusa.prime.com!matt
- From: matt@CIS.Prime.COM (Matt Judenfreund)
- Newsgroups: comp.os.ms-windows.programmer.win32
- Subject: libcmt.lib & errno
- Keywords: libcmt libc errno multi-threaded
- Message-ID: <1992Nov17.194903.14356@medusa.prime.com>
- Date: 17 Nov 92 19:49:03 GMT
- Sender: news@medusa.prime.com
- Reply-To: matt@CIS.Prime.COM
- Organization: Computervision R&D Ltd
- Lines: 20
-
- Is there any info on how/when to use libcmt.lib (the multi-threaded C library)
- and libc.lib (non=multi-threaded)?
-
- I have been using the libcmt.lib, (by virtue of the standard makefile) and
- everything was fine until I tried to access errno. If you do that two things
- happen:
- (1) the linker starts whining about multiple definitions of variables
- (one from libcmt.lib and the other from libc.lib).
- (2) errno remains resolutely stuck at 0.
-
- So perusing <errno.h> I noticed that if _MT is #defined then errno is re-defined
- to use a function _errno. Presuming that _MT stood for multi-threaded I dutifully
- rebuilt with /D_MT and that worked fine.
-
- Is that safe/normal? It certainly doesn't seem like it - if it was than I would
- expect _MT to be defined as standard for the C compiler.
-
- (I am currently using the July version of NT)
-
- Matt
-