From: Boon van der RJ Newsgroups: comp.os.msdos.djgpp Subject: Re: how to link to external libraries Date: Mon, 16 Aug 1999 16:31:36 GMT Organization: Fac. Wiskunde & Informatica, VU, Amsterdam Lines: 27 Message-ID: <7p9ed8$ag2@cs.vu.nl> References: NNTP-Posting-Host: sloep104.cs.vu.nl User-Agent: tin/pre-1.4-19990413 ("Endemoniada") (UNIX) (SunOS/5.5.1 (sun4u)) X-Poster-Key: sha1:fHG+En/aRR3XSKV+jRziNA1nGQ4= Cancel-Lock: sha1:0TIi2jmMPnzqZWJfxCopuR8z7vY= To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Emadeldeen I MUHANNA wrote: > I have a problem concerning about linking to specific libraries in > gcc. My library resides in c:\dialogic\lib\libdxxmt.lib and > c:\dialogic\lib\libsrlmt.lib. I need to link these two libraries to my > program. You would usually do: gcc -Lc:/dialogic/lib file.c -o file.exe -lsrlmt -ldxxmt The -L specifies additional directories to look for libraries, the -lxyz tells gcc to use libxyz. I bet there did come a help or info file with your gcc distribution. Please look under *Invoking GCC* for more information. > If anyone knows, please reply this message. By the way, the > gcc I used is in winnt platform. Thank you. You did realise that this forum is about the DJGPP, the DOS based programming platform right? If you are using djgpp compiled gcc then the extension of the libraries should not be .lib but .a If you use CYGwin or Mingw or lccwin or whatever windows based gcc it might work this way, but I don't know. If you are *not* using the djgpp compiled tools, then you'ld better ask somewhere else. hth, Robert