delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Date: | Tue, 17 Jul 2001 12:59:46 -0700 (PDT) |
From: | Mo DeJong <mdejong AT cygnus DOT com> |
To: | cygwin AT sources DOT redhat DOT com |
Subject: | Linking to cygwin1.dll and msvcrt.dll ? |
Message-ID: | <Pine.SOL.3.91.1010717124542.26161L-100000@cse.cygnus.com> |
MIME-Version: | 1.0 |
Hi all. I am trying to figure out how to create a .dll that depends on cygwin1.dll and msvcrt.dll. Here is the link time error I am currently seeing: gcc -shared -g -o tcl84d.dll -Wl,--out-implib,libtcl84d.a regcomp.o regexec.o regfree.o regerror.o tclAlloc.o tclAsync.o tclBasic.o tclBinary.o tclCkalloc.o tclClock.o tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclCompCmds.o tclCompExpr.o tclCompile.o tclDate.o tclEncoding.o tclEnv.o tclEvent.o tclExecute.o tclFCmd.o tclFileName.o tclGet.o tclHash.o tclHistory.o tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o tclIOGT.o tclIOSock.o tclIOUtil.o tclLink.o tclLiteral.o tclListObj.o tclLoad.o tclMain.o tclNamesp.o tclNotify.o tclObj.o tclPanic.o tclParse.o tclParseExpr.o tclPipe.o tclPkg.o tclPosixStr.o tclPreserve.o tclProc.o tclRegexp.o tclResolve.o tclResult.o tclScan.o tclStringObj.o tclStubInit.o tclStubLib.o tclThread.o tclThreadJoin.o tclTimer.o tclUtf.o tclUtil.o tclVar.o tclWin32Dll.o tclWinChan.o tclWinConsole.o tclWinSerial.o tclWinError.o tclWinFCmd.o tclWinFile.o tclWinInit.o tclWinLoad.o tclWinMtherr.o tclWinNotify.o tclWinPipe.o tclWinSock.o tclWinThrd.o tclWinTime.o strftime.o tcl.res.o Creating library file: libtcl84d.a tclWinThrd.o(.text+0x2e): undefined reference to `_beginthreadex' tclWinThrd.o(.text+0xf5): undefined reference to `_endthreadex' collect2: ld returned 1 exit status make: *** [tcl84d.dll] Error 1 When building with the -no-cygwin, the -lmsvcrt flag is automatically passed to the linker. Thing is you can't just pass -lmsvcrt to Cygwin's gcc because the libmsvcrt.a file lives in /lib/mingw/libmsvcrt.a which is only searched when -mno-cygwin is passed. These calls to _beginthreadex and _endthreadex are made instead of calling CreateThread and ExitThread because of a problem with memory leaks. Any ideas how I can work around this problem? thanks Mo DeJong Red Hat Inc -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |